Created
September 15, 2012 09:28
-
-
Save daz/3727108 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 Employee | |
PAY_RATES = [1, 6, 7.80] | |
def pay_rate | |
case age | |
when 0..15 | |
PAY_RATE[0] | |
when 15..16 | |
PAY_RATE[1] | |
else | |
PAY_RATE[3] | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment