Class: Tmoney::Transaction
- Inherits:
-
Object
- Object
- Tmoney::Transaction
- Defined in:
- lib/tmoney/transaction.rb
Instance Attribute Summary collapse
-
#amount ⇒ Object
Returns the value of attribute amount.
-
#category ⇒ Object
Returns the value of attribute category.
-
#datetime ⇒ Object
Returns the value of attribute datetime.
-
#payee ⇒ Object
Returns the value of attribute payee.
Instance Method Summary collapse
Instance Attribute Details
#amount ⇒ Object
Returns the value of attribute amount.
3 4 5 |
# File 'lib/tmoney/transaction.rb', line 3 def amount @amount end |
#category ⇒ Object
Returns the value of attribute category.
3 4 5 |
# File 'lib/tmoney/transaction.rb', line 3 def category @category end |
#datetime ⇒ Object
Returns the value of attribute datetime.
3 4 5 |
# File 'lib/tmoney/transaction.rb', line 3 def datetime @datetime end |
#payee ⇒ Object
Returns the value of attribute payee.
3 4 5 |
# File 'lib/tmoney/transaction.rb', line 3 def payee @payee end |
Instance Method Details
#to_s ⇒ Object
5 6 7 |
# File 'lib/tmoney/transaction.rb', line 5 def to_s "#{@datetime.strftime('%Y-%m-%d %H:%M:%S')} #{@category} #{@payee} #{@amount}" end |