Skip to content

Instantly share code, notes, and snippets.

@nbfritz
Created December 14, 2012 15:27
Show Gist options
  • Select an option

  • Save nbfritz/4286255 to your computer and use it in GitHub Desktop.

Select an option

Save nbfritz/4286255 to your computer and use it in GitHub Desktop.
Ruby Hash Post - Part 1: pretty good status lookup
STATUS_MESSAGES = {
200 => :ok,
201 => :created,
202 => :accepted
}
STATUS_MESSAGES[200] # => :ok
STATUS_MESSAGES[999] # => nil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment