Skip to content

Instantly share code, notes, and snippets.

@samleb
Created November 24, 2009 01:03
Show Gist options
  • Select an option

  • Save samleb/241532 to your computer and use it in GitHub Desktop.

Select an option

Save samleb/241532 to your computer and use it in GitHub Desktop.
(roles & ROLES).sum { |r| 1 << ROLES.index(r) }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment