Class: Gnucash::AccountTransaction
- Inherits:
-
Object
- Object
- Gnucash::AccountTransaction
- Includes:
- Support::LightInspect
- Defined in:
- lib/gnucash/account_transaction.rb
Overview
Class to link a transaction object to an Account.
Instance Attribute Summary collapse
-
#value ⇒ Value
readonly
The transaction value for the linked account.
Instance Method Summary collapse
-
#attributes ⇒ Array<Symbol>
Attributes available for inspection.
-
#initialize(real_txn, value) ⇒ AccountTransaction
constructor
Construct an AccountTransaction object.
-
#method_missing(*args) ⇒ Object
Pass through any missing method calls to the linked Transaction object.
Methods included from Support::LightInspect
Constructor Details
#initialize(real_txn, value) ⇒ AccountTransaction
Construct an AccountTransaction object.
This method is used internally when building a Transaction object.
17 18 19 20 |
# File 'lib/gnucash/account_transaction.rb', line 17 def initialize(real_txn, value) @real_txn = real_txn @value = value end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(*args) ⇒ Object
Pass through any missing method calls to the linked Transaction object.
23 24 25 |
# File 'lib/gnucash/account_transaction.rb', line 23 def method_missing(*args) @real_txn.send(*args) end |
Instance Attribute Details
#value ⇒ Value (readonly)
Returns The transaction value for the linked account.
7 8 9 |
# File 'lib/gnucash/account_transaction.rb', line 7 def value @value end |
Instance Method Details
#attributes ⇒ Array<Symbol>
Attributes available for inspection
31 32 33 |
# File 'lib/gnucash/account_transaction.rb', line 31 def attributes %i[value] end |