Class: Volksbanker::AmexLineItem

Inherits:
Object
  • Object
show all
Defined in:
lib/volksbanker/amex_line_item.rb

Constant Summary collapse

DATE_FORMAT =
'%d/%m/%Y'

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(date, amount, description) ⇒ AmexLineItem

Returns a new instance of AmexLineItem.



8
9
10
11
12
# File 'lib/volksbanker/amex_line_item.rb', line 8

def initialize(date, amount, description)
  @date = date
  @amount = amount
  @description = description
end

Instance Attribute Details

#amountObject (readonly)

Returns the value of attribute amount.



6
7
8
# File 'lib/volksbanker/amex_line_item.rb', line 6

def amount
  @amount
end

#descriptionObject (readonly)

Returns the value of attribute description.



6
7
8
# File 'lib/volksbanker/amex_line_item.rb', line 6

def description
  @description
end

Instance Method Details

#dateObject



14
15
16
# File 'lib/volksbanker/amex_line_item.rb', line 14

def date
  @date.strftime DATE_FORMAT
end