Last active
August 29, 2015 14:02
-
-
Save iancmason/104be4f2697ccb58c970 to your computer and use it in GitHub Desktop.
Ruby Notes
This file contains hidden or 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 Notes | |
string interpolation - insert num into string | |
like - num = 1 | |
p "1 + #{num}" | |
Not '1 + #{num' #Ruby doesn't read single quotes for string interpolation | |
staying dry = do not repeat yourself | |
use underscores to demarcate, in place of commas for large numbers such as 1_000_000 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment