Class: CodaStandard::TransactionList
- Inherits:
-
Object
- Object
- CodaStandard::TransactionList
- Defined in:
- lib/coda_standard/transaction_list.rb
Instance Attribute Summary collapse
-
#current_account ⇒ Object
Returns the value of attribute current_account.
-
#current_account_type ⇒ Object
Returns the value of attribute current_account_type.
-
#current_bic ⇒ Object
Returns the value of attribute current_bic.
-
#old_balance ⇒ Object
Returns the value of attribute old_balance.
-
#transactions ⇒ Object
readonly
Returns the value of attribute transactions.
Instance Method Summary collapse
- #create_transaction ⇒ Object
- #each_with_index(&blk) ⇒ Object
- #find_by_structured_communication(structured_communication) ⇒ Object
-
#initialize ⇒ TransactionList
constructor
A new instance of TransactionList.
Constructor Details
#initialize ⇒ TransactionList
Returns a new instance of TransactionList.
6 7 8 |
# File 'lib/coda_standard/transaction_list.rb', line 6 def initialize @transactions = [] end |
Instance Attribute Details
#current_account ⇒ Object
Returns the value of attribute current_account.
3 4 5 |
# File 'lib/coda_standard/transaction_list.rb', line 3 def current_account @current_account end |
#current_account_type ⇒ Object
Returns the value of attribute current_account_type.
3 4 5 |
# File 'lib/coda_standard/transaction_list.rb', line 3 def current_account_type @current_account_type end |
#current_bic ⇒ Object
Returns the value of attribute current_bic.
3 4 5 |
# File 'lib/coda_standard/transaction_list.rb', line 3 def current_bic @current_bic end |
#old_balance ⇒ Object
Returns the value of attribute old_balance.
3 4 5 |
# File 'lib/coda_standard/transaction_list.rb', line 3 def old_balance @old_balance end |
#transactions ⇒ Object (readonly)
Returns the value of attribute transactions.
4 5 6 |
# File 'lib/coda_standard/transaction_list.rb', line 4 def transactions @transactions end |
Instance Method Details
#create_transaction ⇒ Object
10 11 12 13 |
# File 'lib/coda_standard/transaction_list.rb', line 10 def create_transaction @transactions << Transaction.new @transactions.last end |
#each_with_index(&blk) ⇒ Object
15 16 17 |
# File 'lib/coda_standard/transaction_list.rb', line 15 def each_with_index(&blk) @transactions.each_with_index(&blk) end |
#find_by_structured_communication(structured_communication) ⇒ Object
19 20 21 |
# File 'lib/coda_standard/transaction_list.rb', line 19 def find_by_structured_communication(structured_communication) @transactions.select{ |t| t.match_structured_communication(structured_communication) } end |