Class: XRBP::NodeStore::STLedgerEntry
- Defined in:
- lib/xrbp/nodestore/sle/st_ledger_entry.rb
Overview
Special type of Serialized Object whose type is identified through the ‘ledger_entry_type’ field
Instance Attribute Summary collapse
-
#key ⇒ Object
readonly
Returns the value of attribute key.
Attributes inherited from STObject
Instance Method Summary collapse
-
#initialize(args = {}) ⇒ STLedgerEntry
constructor
A new instance of STLedgerEntry.
- #type ⇒ Object
- #type_code ⇒ Object
Methods inherited from STObject
#account_id, #amount, #field, #field?, #flag?, #flags
Constructor Details
#initialize(args = {}) ⇒ STLedgerEntry
Returns a new instance of STLedgerEntry.
8 9 10 11 |
# File 'lib/xrbp/nodestore/sle/st_ledger_entry.rb', line 8 def initialize(args={}) super @key = args[:key] end |
Instance Attribute Details
#key ⇒ Object (readonly)
Returns the value of attribute key.
6 7 8 |
# File 'lib/xrbp/nodestore/sle/st_ledger_entry.rb', line 6 def key @key end |
Instance Method Details
#type ⇒ Object
17 18 19 |
# File 'lib/xrbp/nodestore/sle/st_ledger_entry.rb', line 17 def type @type ||= Format::LEDGER_ENTRY_TYPE_CODES[type_code] end |
#type_code ⇒ Object
13 14 15 |
# File 'lib/xrbp/nodestore/sle/st_ledger_entry.rb', line 13 def type_code @type_code ||= field(:uint16, :ledger_entry_type) end |