Class: JSONAPI::OperationResult

Inherits:
Object
  • Object
show all
Defined in:
lib/jsonapi/operation_result.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(code, options = {}) ⇒ OperationResult


8
9
10
11
12
13
# File 'lib/jsonapi/operation_result.rb', line 8

def initialize(code, options = {})
  @code = code
  @options = options
  @meta = options.fetch(:meta, {})
  @links = options.fetch(:links, {})
end

Instance Attribute Details

#codeObject

Returns the value of attribute code


3
4
5
# File 'lib/jsonapi/operation_result.rb', line 3

def code
  @code
end

Returns the value of attribute links


5
6
7
# File 'lib/jsonapi/operation_result.rb', line 5

def links
  @links
end

#metaObject

Returns the value of attribute meta


4
5
6
# File 'lib/jsonapi/operation_result.rb', line 4

def meta
  @meta
end

#optionsObject

Returns the value of attribute options


6
7
8
# File 'lib/jsonapi/operation_result.rb', line 6

def options
  @options
end