Created
December 10, 2018 06:15
-
-
Save webuilder240/3e3d60b5e27b83ccf50b5db17477d1a5 to your computer and use it in GitHub Desktop.
state
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
class Hoge | |
module States | |
ALL = 'all'.freeze | |
EVENT = 'event'.freeze | |
GROUP = 'group'.freeze | |
end | |
def fuga | |
case state | |
when States::ALL | |
# all | |
when States::EVENT | |
# event | |
when States::GROUP | |
# group | |
else | |
# else | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment