Class: CodaStandard::TransactionList

Inherits:
Object
  • Object
show all
Defined in:
lib/coda_standard/transaction_list.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeTransactionList

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_accountObject

Returns the value of attribute current_account.



3
4
5
# File 'lib/coda_standard/transaction_list.rb', line 3

def 
  @current_account
end

#current_account_typeObject

Returns the value of attribute current_account_type.



3
4
5
# File 'lib/coda_standard/transaction_list.rb', line 3

def 
  @current_account_type
end

#current_bicObject

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_balanceObject

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

#transactionsObject (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_transactionObject



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