Class: Reynard::Operation
- Inherits:
-
Object
- Object
- Reynard::Operation
- Defined in:
- lib/reynard/operation.rb
Overview
Holds the node reference to an operation in the API specification.
Constant Summary collapse
- DEFAULT_MEDIA_TYPE =
'application/json'
Instance Attribute Summary collapse
-
#node ⇒ Object
readonly
Returns the value of attribute node.
Instance Method Summary collapse
-
#initialize(node:) ⇒ Operation
constructor
A new instance of Operation.
- #path ⇒ Object
- #verb ⇒ Object
Constructor Details
#initialize(node:) ⇒ Operation
Returns a new instance of Operation.
10 11 12 |
# File 'lib/reynard/operation.rb', line 10 def initialize(node:) @node = node end |
Instance Attribute Details
#node ⇒ Object (readonly)
Returns the value of attribute node.
8 9 10 |
# File 'lib/reynard/operation.rb', line 8 def node @node end |
Instance Method Details
#path ⇒ Object
14 15 16 |
# File 'lib/reynard/operation.rb', line 14 def path @node[1] end |
#verb ⇒ Object
18 19 20 |
# File 'lib/reynard/operation.rb', line 18 def verb @node[2] end |