Exception: Grape::Exceptions::Base
- Inherits:
-
StandardError
- Object
- StandardError
- Grape::Exceptions::Base
- Defined in:
- lib/grape/exceptions/base.rb
Direct Known Subclasses
InvalidFormatter, InvalidVersionerOption, InvalidWithOptionForRepresent, MissingMimeType, MissingOption, MissingVendorOption, UnknownOptions, UnknownValidator, Validation
Constant Summary
- BASE_MESSAGES_KEY =
'grape.errors.messages'- BASE_ATTRIBUTES_KEY =
'grape.errors.attributes'
Instance Attribute Summary (collapse)
-
- (Object) headers
readonly
Returns the value of attribute headers.
-
- (Object) message
readonly
Returns the value of attribute message.
-
- (Object) status
readonly
Returns the value of attribute status.
Instance Method Summary (collapse)
- - (Object) [](index)
-
- (Base) initialize(args = {})
constructor
A new instance of Base.
Constructor Details
- (Base) initialize(args = {})
A new instance of Base
10 11 12 13 14 |
# File 'lib/grape/exceptions/base.rb', line 10 def initialize(args = {}) @status = args[:status] || nil @message = args[:message] || nil @headers = args[:headers] || nil end |
Instance Attribute Details
- (Object) headers (readonly)
Returns the value of attribute headers
8 9 10 |
# File 'lib/grape/exceptions/base.rb', line 8 def headers @headers end |
- (Object) message (readonly)
Returns the value of attribute message
8 9 10 |
# File 'lib/grape/exceptions/base.rb', line 8 def @message end |
- (Object) status (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
- (Object) [](index)
16 17 18 |
# File 'lib/grape/exceptions/base.rb', line 16 def [](index) self.send(index) end |