Skip to content

Instantly share code, notes, and snippets.

@leejarvis
Created September 20, 2011 22:14
Show Gist options
  • Save leejarvis/1230580 to your computer and use it in GitHub Desktop.
Save leejarvis/1230580 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
# C'MON
id = 4
username = begin
if (1..10).include?(id)
'admin'
elsif id < 15
'mod'
else
'other'
end
end
username = case id
when 1..10 then 'admin'
when 10..15 then 'mod'
else
'other'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment