lib/farecalculator.rb
# Yuck, I don't like this but it's quicker
Yuck, I don't like this but it's quicker
Yuck I don ' t like this but it ' s quicker
def findFareForJourney(matchZone, startingZone, endingZone)
      zoneDifference = (startingZone - endingZone).abs
      fareLookupTable = fareTable(matchZone)
      @@log.debug("Looking up fare for difference: #{zoneDifference}")
      fareLookupTable[zoneDifference]
    end
def findFareForJourney ( matchZone , startingZone , endingZone ) zoneDifference = ( startingZone - endingZone ) . abs fareLookupTable = fareTable ( matchZone ) @@log . debug ( "Looking up fare for difference: #{zoneDifference}" ) fareLookupTable [ zoneDifference ] end
Yuck, I don't like this but it's quicker
Yuck I don ' t like this but it ' s quicker
matchZone
<not_specific>
startingZone
<not_specific>
endingZone
<not_specific>