Class: LedgerSync::Test::Record

Inherits:
Object
  • Object
show all
Defined in:
lib/ledger_sync/test/support/record_collection.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args = {}) ⇒ Record

Returns a new instance of Record.



8
9
10
11
12
# File 'lib/ledger_sync/test/support/record_collection.rb', line 8

def initialize(args = {})
  @hash = args.fetch(:hash)
  @path = args.fetch(:path)
  @record = args.fetch(:record)
end

Instance Attribute Details

#hashObject (readonly)

Returns the value of attribute hash.



6
7
8
# File 'lib/ledger_sync/test/support/record_collection.rb', line 6

def hash
  @hash
end

#pathObject (readonly)

Returns the value of attribute path.



6
7
8
# File 'lib/ledger_sync/test/support/record_collection.rb', line 6

def path
  @path
end

#recordObject (readonly)

Returns the value of attribute record.



6
7
8
# File 'lib/ledger_sync/test/support/record_collection.rb', line 6

def record
  @record
end

Instance Method Details

#idObject



14
15
16
# File 'lib/ledger_sync/test/support/record_collection.rb', line 14

def id
  @id ||= hash.fetch('id', nil)
end