Created
December 20, 2011 20:00
-
-
Save jashkenas/1503012 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
switch filter.type | |
when 'is' | |
return no unless value is filter.value | |
when 'isnt' | |
return no unless value isnt filter.value | |
when 'matches' | |
return no unless value.match filter.value |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment