Class: Halffare::PriceGuess
- Defined in:
- lib/halffare/price_guess.rb
Overview
Simple guesstimator assuming half-fare card is always half the price which is probably the case for non-regional tickets
Direct Known Subclasses
Instance Method Summary collapse
Methods inherited from PriceBase
Instance Method Details
#get(order) ⇒ Object
5 6 7 8 9 10 11 12 |
# File 'lib/halffare/price_guess.rb', line 5 def get(order) price = order.price.to_f if @halffare return price, price*2 else return price/2, price end end |