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