Class: JSONAPI::Warning
- Inherits:
-
Object
- Object
- JSONAPI::Warning
- Defined in:
- lib/jsonapi/error.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
Returns the value of attribute code.
-
#detail ⇒ Object
Returns the value of attribute detail.
-
#title ⇒ Object
Returns the value of attribute title.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Warning
constructor
A new instance of Warning.
Constructor Details
#initialize(options = {}) ⇒ Warning
Returns a new instance of Warning.
24 25 26 27 28 29 30 31 32 |
# File 'lib/jsonapi/error.rb', line 24 def initialize( = {}) @title = [:title] @detail = [:detail] @code = if JSONAPI.configuration.use_text_errors TEXT_ERRORS[[:code]] else [:code] end end |
Instance Attribute Details
#code ⇒ Object
Returns the value of attribute code.
23 24 25 |
# File 'lib/jsonapi/error.rb', line 23 def code @code end |
#detail ⇒ Object
Returns the value of attribute detail.
23 24 25 |
# File 'lib/jsonapi/error.rb', line 23 def detail @detail end |
#title ⇒ Object
Returns the value of attribute title.
23 24 25 |
# File 'lib/jsonapi/error.rb', line 23 def title @title end |