Created
November 24, 2016 15:47
-
-
Save Martin-Nyaga/de793070e919f98f03800b0410fe6431 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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