class RestPack::Service::Response::Status

Public Class Methods

from_code(code) click to toggle source
# File lib/restpack_service/response.rb, line 49
def self.from_code(code)
  if @@map.has_key?(code)
    @@map[code]
  else
    raise "Invalid Status Code: #{code}"
  end
end
from_status(status) click to toggle source
# File lib/restpack_service/response.rb, line 57
def self.from_status(status)
  if @@map.has_value?(status)
    @@map.key(status)
  else
    raise "Invalid Status: #{status}"
  end
end