Class: Hola::Offer::StrawberryBulkDiscount
Constant Summary
collapse
- DISCOUNTED_PRICE =
BigDecimal("4.5")
Instance Attribute Summary
Attributes inherited from Hola::Offer
#quantity
Instance Method Summary
collapse
Methods inherited from Hola::Offer
#initialize, #subtotal
Constructor Details
This class inherits a constructor from Hola::Offer
Instance Method Details
#applied? ⇒ Boolean
18
19
20
|
# File 'lib/hola/offer/strawberry_bulk_discount.rb', line 18
def applied?
eligible?
end
|
#name ⇒ Object
10
11
12
|
# File 'lib/hola/offer/strawberry_bulk_discount.rb', line 10
def name
"Strawberry Bulk Discount"
end
|
#price ⇒ Object
14
15
16
|
# File 'lib/hola/offer/strawberry_bulk_discount.rb', line 14
def price
eligible? ? DISCOUNTED_PRICE : super
end
|