Skip to content

Instantly share code, notes, and snippets.

@Martin-Nyaga
Created November 24, 2016 15:47
Show Gist options
  • Save Martin-Nyaga/de793070e919f98f03800b0410fe6431 to your computer and use it in GitHub Desktop.
Save Martin-Nyaga/de793070e919f98f03800b0410fe6431 to your computer and use it in GitHub Desktop.
class MatatuParkingTicket < ParkingTicket
def base_fee
1100
end
def surcharge
weekdays.inlcude?(@day) ? super * 1.5 : super
end
private
def weekdays
[Monday", "Tuesday", "Wednesday", "Thursday", "Friday"]
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment