Class: Tmoney::Transaction

Inherits:
Object
  • Object
show all
Defined in:
lib/tmoney/transaction.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#amountObject

Returns the value of attribute amount.



3
4
5
# File 'lib/tmoney/transaction.rb', line 3

def amount
  @amount
end

#categoryObject

Returns the value of attribute category.



3
4
5
# File 'lib/tmoney/transaction.rb', line 3

def category
  @category
end

#datetimeObject

Returns the value of attribute datetime.



3
4
5
# File 'lib/tmoney/transaction.rb', line 3

def datetime
  @datetime
end

#payeeObject

Returns the value of attribute payee.



3
4
5
# File 'lib/tmoney/transaction.rb', line 3

def payee
  @payee
end

Instance Method Details

#to_sObject



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