Class: Reynard::Operation

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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

#nodeObject (readonly)

Returns the value of attribute node.



8
9
10
# File 'lib/reynard/operation.rb', line 8

def node
  @node
end

Instance Method Details

#pathObject



14
15
16
# File 'lib/reynard/operation.rb', line 14

def path
  @node[1]
end

#verbObject



18
19
20
# File 'lib/reynard/operation.rb', line 18

def verb
  @node[2]
end