Module: Rack::Utils

Defined in:
lib/david/guerilla/rack/utils.rb

Class Method Summary collapse

Class Method Details

.status_code(status) ⇒ Object


5
6
7
8
9
10
11
12
13
14
# File 'lib/david/guerilla/rack/utils.rb', line 5

def status_code(status)
  case status
  when Symbol
    SYMBOL_TO_STATUS_CODE[status] || 500
  when Float
    status
  else
    status.to_i
  end
end