Exception: Grape::Exceptions::Base
- Inherits:
- 
      StandardError
      
        - Object
- StandardError
- Grape::Exceptions::Base
 
- Defined in:
- lib/grape/exceptions/base.rb
Direct Known Subclasses
IncompatibleOptionValues, InvalidAcceptHeader, InvalidFormatter, InvalidMessageBody, InvalidResponse, InvalidVersionHeader, InvalidVersionerOption, InvalidWithOptionForRepresent, MethodNotAllowed, MissingGroupTypeError, MissingMimeType, MissingOption, MissingVendorOption, UnknownOptions, UnknownParameter, UnknownValidator, UnsupportedGroupTypeError, Validation, ValidationArrayErrors, ValidationErrors
Constant Summary collapse
- BASE_MESSAGES_KEY =
- 'grape.errors.messages'.freeze 
- BASE_ATTRIBUTES_KEY =
- 'grape.errors.attributes'.freeze 
- FALLBACK_LOCALE =
- :en
Instance Attribute Summary collapse
- 
  
    
      #headers  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    Returns the value of attribute headers. 
- 
  
    
      #message  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    Returns the value of attribute message. 
- 
  
    
      #status  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    Returns the value of attribute status. 
Instance Method Summary collapse
- #[](index) ⇒ Object
- 
  
    
      #initialize(status: nil, message: nil, headers: nil, **_options)  ⇒ Base 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of Base. 
Constructor Details
#initialize(status: nil, message: nil, headers: nil, **_options) ⇒ Base
Returns a new instance of Base.
| 10 11 12 13 14 | # File 'lib/grape/exceptions/base.rb', line 10 def initialize(status: nil, message: nil, headers: nil, **) @status = status @message = @headers = headers end | 
Instance Attribute Details
#headers ⇒ Object (readonly)
Returns the value of attribute headers.
| 8 9 10 | # File 'lib/grape/exceptions/base.rb', line 8 def headers @headers end | 
#message ⇒ Object (readonly)
Returns the value of attribute message.
| 8 9 10 | # File 'lib/grape/exceptions/base.rb', line 8 def @message end | 
#status ⇒ Object (readonly)
Returns the value of attribute status.
| 8 9 10 | # File 'lib/grape/exceptions/base.rb', line 8 def status @status end | 
Instance Method Details
#[](index) ⇒ Object
| 16 17 18 | # File 'lib/grape/exceptions/base.rb', line 16 def [](index) send index end |