Last active
December 11, 2015 19:08
-
-
Save tigawa/4646084 to your computer and use it in GitHub Desktop.
ruby イディオム
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
#破壊的メソッド | |
empty? | |
#デフォルト値などをかえしたい時に欲使う | |
a || b | |
#以下の2つは同じ意味 | |
count ||= 0 | |
count = count || 0 | |
#絶対パス | |
require File.dirname(__FILE__) + '/../test_helper' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment