Created
August 16, 2011 15:46
-
-
Save dbackeus/1149392 to your computer and use it in GitHub Desktop.
linebreaks etc
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
# Statement are seperated by line breaks | |
def my_method | |
"hello" | |
end | |
# You can put several statements on one line if... | |
def my_method; "hello"; end | |
# After an operator... | |
1 + | |
1 | |
# => 2 | |
"20". | |
to_i | |
# => 20 | |
# Linebreaks in strings | |
string = "I have | |
linebreaks!" |
kotp
commented
Sep 28, 2012
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment