Class: QuickenParser::Transaction
- Inherits:
-
Object
- Object
- QuickenParser::Transaction
- Defined in:
- lib/quicken_parser/transaction.rb
Instance Attribute Summary collapse
-
#amount ⇒ Object
Returns the value of attribute amount.
-
#memo ⇒ Object
Returns the value of attribute memo.
-
#name ⇒ Object
Returns the value of attribute name.
-
#number ⇒ Object
Returns the value of attribute number.
-
#timestamp ⇒ Object
Returns the value of attribute timestamp.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(args = {}) ⇒ Transaction
constructor
A new instance of Transaction.
- #to_s ⇒ Object
Constructor Details
#initialize(args = {}) ⇒ Transaction
Returns a new instance of Transaction.
5 6 7 8 9 10 11 |
# File 'lib/quicken_parser/transaction.rb', line 5 def initialize(args={}) args.each_pair do |key, value| send("#{key}=", value) end @memo = nil if @name.to_s.strip == @memo.to_s.strip end |
Instance Attribute Details
#amount ⇒ Object
Returns the value of attribute amount.
3 4 5 |
# File 'lib/quicken_parser/transaction.rb', line 3 def amount @amount end |
#memo ⇒ Object
Returns the value of attribute memo.
3 4 5 |
# File 'lib/quicken_parser/transaction.rb', line 3 def memo @memo end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/quicken_parser/transaction.rb', line 3 def name @name end |
#number ⇒ Object
Returns the value of attribute number.
3 4 5 |
# File 'lib/quicken_parser/transaction.rb', line 3 def number @number end |
#timestamp ⇒ Object
Returns the value of attribute timestamp.
3 4 5 |
# File 'lib/quicken_parser/transaction.rb', line 3 def @timestamp end |
#type ⇒ Object
Returns the value of attribute type.
3 4 5 |
# File 'lib/quicken_parser/transaction.rb', line 3 def type @type end |
Instance Method Details
#to_s ⇒ Object
13 14 15 |
# File 'lib/quicken_parser/transaction.rb', line 13 def to_s "%s: %s %s %s" % [.to_s, type, name, amount.to_s] end |