Module: LedgerSync::OperationResult::ResultTypeBase

Defined in:
lib/ledger_sync/result.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#operationObject (readonly)

Returns the value of attribute operation.



38
39
40
# File 'lib/ledger_sync/result.rb', line 38

def operation
  @operation
end

#resourceObject (readonly)

Returns the value of attribute resource.



38
39
40
# File 'lib/ledger_sync/result.rb', line 38

def resource
  @resource
end

#responseObject (readonly)

Returns the value of attribute response.



38
39
40
# File 'lib/ledger_sync/result.rb', line 38

def response
  @response
end

Class Method Details

.included(base) ⇒ Object



40
41
42
43
44
# File 'lib/ledger_sync/result.rb', line 40

def self.included(base)
  base.class_eval do
    simply_serialize only: %i[operation resource response]
  end
end

Instance Method Details

#initialize(*args, **keywords) ⇒ Object



46
47
48
49
50
51
# File 'lib/ledger_sync/result.rb', line 46

def initialize(*args, **keywords)
  @operation = keywords.fetch(:operation)
  @resource = keywords.fetch(:resource)
  @response = keywords.fetch(:response)
  super(*args)
end