Created
September 8, 2013 18:41
-
-
Save Mparaiso/6487316 to your computer and use it in GitHub Desktop.
humblerubybook
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# hello word with ruby. | |
puts "Hello, world, What is your name?" | |
myname = gets() | |
result=<<HERE | |
Well, hello there, #{myname}." | |
HERE | |
puts result; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# RUBY STRINGS | |
puts %q{this is a single quoted string!} | |
puts %Q;this is a double quoted string and i write it 4 times : #{"\'some string\' " * 4}; | |
puts "This is a double quoted string" | |
myString=<<HERE | |
This is my string. | |
Heredoc and multiline. | |
Cool hey ? | |
HERE | |
puts myString |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# RUBY numbers , Fixnum and Bignum |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment