Class: CashRegister::Two4OneItem
Instance Attribute Summary
Attributes inherited from NormalItem
#count, #deal
Instance Method Summary
collapse
Methods inherited from NormalItem
#initialize, #to_s
Methods included from Helper
#format_price
Instance Method Details
#billing ⇒ Object
4
5
6
|
# File 'lib/cash_register/two4one_item.rb', line 4
def billing
@billing ||= deal.price * (count - count/3)
end
|
#saving ⇒ Object
8
9
10
|
# File 'lib/cash_register/two4one_item.rb', line 8
def saving
@saving ||= deal.price * count - billing
end
|