Class: TicketSales::Promotion::EveryHundredthKilometer
- Defined in:
- lib/ticket_sales/promotion.rb
Instance Attribute Summary
Attributes inherited from AmountOff
Instance Method Summary collapse
Methods inherited from AmountOff
Constructor Details
This class inherits a constructor from TicketSales::Promotion::AmountOff
Instance Method Details
#discount(ticket) ⇒ Object
41 42 43 |
# File 'lib/ticket_sales/promotion.rb', line 41 def discount(ticket) [@amount * (ticket.distance / 100), ticket.price].min end |