Created
May 17, 2016 20:14
-
-
Save topicus/45ba6d7f2e0c701ac3b6f08b73e22546 to your computer and use it in GitHub Desktop.
select statement
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
select(input) { | |
['option1', 'option2'] : 'label'; | |
['otherOption', 'otherOption2'] : 'label2'; | |
}; | |
select('option1') // returns label | |
select('option2') // returns label | |
select('otherOption2') // returns label2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment