Class: JSONAPI::Operation
- Inherits:
-
Object
- Object
- JSONAPI::Operation
- Defined in:
- lib/jsonapi/operation.rb
Direct Known Subclasses
CreateHasManyAssociationOperation, CreateResourceOperation, FindOperation, RemoveHasManyAssociationOperation, RemoveHasOneAssociationOperation, RemoveResourceOperation, ReplaceFieldsOperation, ReplaceHasManyAssociationOperation, ReplaceHasOneAssociationOperation, ShowAssociationOperation, ShowOperation, ShowRelatedResourceOperation, ShowRelatedResourcesOperation
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#resource_klass ⇒ Object
readonly
Returns the value of attribute resource_klass.
-
#transactional ⇒ Object
readonly
Returns the value of attribute transactional.
Instance Method Summary collapse
- #apply ⇒ Object
-
#initialize(resource_klass, options = {}) ⇒ Operation
constructor
A new instance of Operation.
Constructor Details
#initialize(resource_klass, options = {}) ⇒ Operation
Returns a new instance of Operation.
5 6 7 8 9 10 |
# File 'lib/jsonapi/operation.rb', line 5 def initialize(resource_klass, = {}) @context = [:context] @resource_klass = resource_klass @options = @transactional = true end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
3 4 5 |
# File 'lib/jsonapi/operation.rb', line 3 def @options end |
#resource_klass ⇒ Object (readonly)
Returns the value of attribute resource_klass.
3 4 5 |
# File 'lib/jsonapi/operation.rb', line 3 def resource_klass @resource_klass end |
#transactional ⇒ Object (readonly)
Returns the value of attribute transactional.
3 4 5 |
# File 'lib/jsonapi/operation.rb', line 3 def transactional @transactional end |
Instance Method Details
#apply ⇒ Object
12 13 |
# File 'lib/jsonapi/operation.rb', line 12 def apply end |