Class: QuickenParser::Transactions
- Inherits:
-
Object
- Object
- QuickenParser::Transactions
- Includes:
- Enumerable
- Defined in:
- lib/quicken_parser/transactions.rb
Instance Attribute Summary collapse
-
#timespan ⇒ Object
Returns the value of attribute timespan.
Instance Method Summary collapse
- #<<(txn) ⇒ Object
- #each ⇒ Object
- #first ⇒ Object
-
#initialize(args = {}) ⇒ Transactions
constructor
A new instance of Transactions.
- #last ⇒ Object
- #length ⇒ Object (also: #size)
Constructor Details
#initialize(args = {}) ⇒ Transactions
Returns a new instance of Transactions.
6 7 8 9 10 11 |
# File 'lib/quicken_parser/transactions.rb', line 6 def initialize(args={}) @txns = Array.new args.each_pair do |key, value| send("#{key}=", value) end end |
Instance Attribute Details
#timespan ⇒ Object
Returns the value of attribute timespan.
4 5 6 |
# File 'lib/quicken_parser/transactions.rb', line 4 def timespan @timespan end |
Instance Method Details
#<<(txn) ⇒ Object
26 27 28 |
# File 'lib/quicken_parser/transactions.rb', line 26 def <<(txn) @txns << txn end |
#each ⇒ Object
30 31 32 33 34 |
# File 'lib/quicken_parser/transactions.rb', line 30 def each @txns.each do |txn| yield txn end end |
#first ⇒ Object
13 14 15 |
# File 'lib/quicken_parser/transactions.rb', line 13 def first @txns.first end |
#last ⇒ Object
17 18 19 |
# File 'lib/quicken_parser/transactions.rb', line 17 def last @txns.last end |
#length ⇒ Object Also known as: size
21 22 23 |
# File 'lib/quicken_parser/transactions.rb', line 21 def length @txns.length end |