Class: JSONAPI::OperationResult
- Inherits:
-
Object
- Object
- JSONAPI::OperationResult
- Defined in:
- lib/jsonapi/operation_result.rb
Direct Known Subclasses
ErrorsOperationResult, LinksObjectOperationResult, ResourceOperationResult, ResourcesOperationResult
Instance Attribute Summary collapse
-
#code ⇒ Object
Returns the value of attribute code.
-
#links ⇒ Object
Returns the value of attribute links.
-
#meta ⇒ Object
Returns the value of attribute meta.
-
#options ⇒ Object
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(code, options = {}) ⇒ OperationResult
constructor
A new instance of OperationResult.
Constructor Details
#initialize(code, options = {}) ⇒ OperationResult
Returns a new instance of OperationResult.
8 9 10 11 12 13 |
# File 'lib/jsonapi/operation_result.rb', line 8 def initialize(code, = {}) @code = code @options = @meta = .fetch(:meta, {}) @links = .fetch(:links, {}) end |
Instance Attribute Details
#code ⇒ Object
Returns the value of attribute code.
3 4 5 |
# File 'lib/jsonapi/operation_result.rb', line 3 def code @code end |
#links ⇒ Object
Returns the value of attribute links.
5 6 7 |
# File 'lib/jsonapi/operation_result.rb', line 5 def links @links end |
#meta ⇒ Object
Returns the value of attribute meta.
4 5 6 |
# File 'lib/jsonapi/operation_result.rb', line 4 def @meta end |
#options ⇒ Object
Returns the value of attribute options.
6 7 8 |
# File 'lib/jsonapi/operation_result.rb', line 6 def @options end |