Class: Hanami::Http::Status Private
- Inherits:
- 
      Object
      
        - Object
- Hanami::Http::Status
 
- Defined in:
- lib/hanami/http/status.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
An HTTP status
Constant Summary collapse
- ALL =
          This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future. A set of standard codes and messages for HTTP statuses 
- ::Rack::Utils::HTTP_STATUS_CODES 
- SYMBOLS =
          This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future. Symbolic names for status codes 
- ::Rack::Utils::SYMBOL_TO_STATUS_CODE 
Class Method Summary collapse
- 
  
    
      .for_code(code)  ⇒ Array 
    
    
  
  
  
  
  
  
  
  private
  
    Return a status for the given code. 
- 
  
    
      .lookup(code)  ⇒ Integer 
    
    
  
  
  
  
  
  
  
  private
  
    Return a status code for the given code. 
- 
  
    
      .message_for(code)  ⇒ String 
    
    
  
  
  
  
  
  
  
  private
  
    Return a message for the given status code. 
Class Method Details
.for_code(code) ⇒ Array
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Return a status for the given code
| 60 61 62 63 64 65 66 67 | # File 'lib/hanami/http/status.rb', line 60 def self.for_code(code) case code when Integer ALL.assoc(code) when Symbol ALL.assoc(SYMBOLS[code]) end or raise ::Hanami::Action::UnknownHttpStatusError.new(code) end | 
.lookup(code) ⇒ Integer
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Return a status code for the given code
| 103 104 105 | # File 'lib/hanami/http/status.rb', line 103 def self.lookup(code) for_code(code)[0] end | 
.message_for(code) ⇒ String
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Return a message for the given status code
| 141 142 143 | # File 'lib/hanami/http/status.rb', line 141 def self.(code) for_code(code)[1] end |