Last active
January 7, 2016 05:57
-
-
Save YumaInaura/ae29b1aa4b45a152701a to your computer and use it in GitHub Desktop.
Ruby | 定数を参照する ref: http://qiita.com/Yinaura/items/e0502c345b96174a62a4
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
| class World | |
| JAPAN = '日本' | |
| end |
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
| World::JAPAN | |
| # => "日本" |
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
| class World | |
| JAPAN = '日本' | |
| p JAPAN | |
| end | |
| # => "日本" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment