Class: Hola::Offer::GetOneFree

Inherits:
Hola::Offer show all
Defined in:
lib/hola/offer/get_one_free.rb

Instance Method Summary collapse

Methods inherited from Hola::Offer

#initialize, #price, #subtotal

Constructor Details

This class inherits a constructor from Hola::Offer

Instance Method Details

#applied?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/hola/offer/get_one_free.rb', line 14

def applied?
  eligible?
end

#nameObject



6
7
8
# File 'lib/hola/offer/get_one_free.rb', line 6

def name
  "Get One Free"
end

#quantityObject



10
11
12
# File 'lib/hola/offer/get_one_free.rb', line 10

def quantity
  @_quantity ||= super - quantity_reduction
end