Class: LedgerSync::Test::Record
- Inherits:
-
Object
- Object
- LedgerSync::Test::Record
- Defined in:
- lib/ledger_sync/test/support/record_collection.rb
Instance Attribute Summary collapse
-
#hash ⇒ Object
readonly
Returns the value of attribute hash.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#record ⇒ Object
readonly
Returns the value of attribute record.
Instance Method Summary collapse
- #id ⇒ Object
-
#initialize(args = {}) ⇒ Record
constructor
A new instance of Record.
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
#hash ⇒ Object (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 |
#path ⇒ Object (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 |
#record ⇒ Object (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
#id ⇒ Object
14 15 16 |
# File 'lib/ledger_sync/test/support/record_collection.rb', line 14 def id @id ||= hash.fetch('id', nil) end |