the ruby-way

Download The ruby-way

If you can't read please download the document

Upload: fangdeng

Post on 28-May-2015

548 views

Category:

Technology


1 download

TRANSCRIPT

  • 1. This is Ruby! HAPPY CODING

2. class Application { public static void main ( String [] args ) { System . out . println ( "HelloWorld!" ); } } 3. puts "Hello World!" 4. import java.io.InputStreamReader ; import java.io.BufferedReader ; class Application { public static void main ( String [] args ) { System . out . println ( "Whatisyourname?" ); Stringname= "" ; InputStreamReaderinput= new InputStreamReader ( System . in ); BufferedReaderreader= new BufferedReader ( input ); try { name= reader . readLine (). trim (); } catch ( Exceptione ) { ; } System . out . println ( "Nicetomeetyou," + name+ '!' ); } } 5. puts "Whatisyourname?" name = gets . chomp puts "Nicetomeetyou,#{ name } !" 6. a= 10 puts 'a is #{a}' puts "a is#{ a } " # output: # a is #{a} # a is 10 7. More codes 8. Ruby 9.

  • Ruby

10. (true until ruby2.0) 11. 12. 13.

  • Ruby

14. Yukihiro Matsumoto(Matz) 1993 Ruby 15.

  • Perl 5, OO Perl Python, Perl Python

16.

  • , , , . . , .

17.

  • , .

18. Ruby

  • Http://tryruby.org

19. Http://ruby-lang.org 20. Http://railsinstaller.org 21. Ruby 22.

23. 24.

25. alias 26.

  • Rake

27. RubyGems 28. Bundler 29. ... 30. bug 31. _Why The Lucky Stiff 32.

  • Ruby

33. 20+ repo 34. 35.

  • Ruby for web

36.

  • Ruby on Rails

37.

  • Erb

38. Markdown:Rdiscount 39. HAML 40. ... 41. SASS, SCSS 42. 43. Sinatra 44. Sprockets 45. PDoc 46. Watchr 47. More on Github: https://github.com/languages/Ruby 48. Oh,

  • Github Ruby on Rails

49. RubyGithub 50. Ruby Q&A (