Created
March 17, 2015 08:46
-
-
Save keitaj/e9bd67bb3d4743c000b6 to your computer and use it in GitHub Desktop.
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
# ユーザーの入力が1ならBarから、そうでなければBazから派生する | |
class Foo < (user_input == "1" ? Bar : Baz) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment