class Document::All

Public Instance Methods

a() click to toggle source

Utility

# File lib/mt940parser/node_extensions.rb, line 28
def a
  all_transactions.sample
end
to_hash() click to toggle source
# File lib/mt940parser/node_extensions.rb, line 11
def to_hash
  elements.map(&:to_hash)
end
transactions() click to toggle source
# File lib/mt940parser/node_extensions.rb, line 15
def transactions
  elements.flat_map(&:to_hash)
end
transactions_credit() click to toggle source
# File lib/mt940parser/node_extensions.rb, line 19
def transactions_credit
  transactions.select{ |t| t[:type] == :credit}
end
transactions_debit() click to toggle source
# File lib/mt940parser/node_extensions.rb, line 23
def transactions_debit
  transactions.select{ |t| t[:type] == :debit }
end