Class: Hola::Offer::TwoThirdsBulkDiscount

Inherits:
Hola::Offer
  • Object
show all
Defined in:
lib/hola/offer/two_thirds_bulk_discount.rb

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

Returns:

  • (Boolean)


16
17
18
# File 'lib/hola/offer/two_thirds_bulk_discount.rb', line 16

def applied?
  eligible?
end

#nameObject



8
9
10
# File 'lib/hola/offer/two_thirds_bulk_discount.rb', line 8

def name
  "Two-Thirds Bulk Discount"
end

#priceObject



12
13
14
# File 'lib/hola/offer/two_thirds_bulk_discount.rb', line 12

def price
  super * discount
end