Skip to content

Instantly share code, notes, and snippets.

@caseyprovost
Created January 17, 2014 15:46
Show Gist options
  • Select an option

  • Save caseyprovost/8475606 to your computer and use it in GitHub Desktop.

Select an option

Save caseyprovost/8475606 to your computer and use it in GitHub Desktop.
def parse_token(token)
return nil if token.nil?
if token.match(/[2, 4, 6, 8]/)
1
else
0
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment