Last active
May 22, 2016 19:21
-
-
Save lesniakania/a2ae05319897df8db94d4c7bc61a286a 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 Submission | |
MINIMAL_AGE = 18 | |
attr_accessor :age | |
def can_attend? | |
age > MINIMAL_AGE | |
end | |
end | |
submission = Submission.new | |
submission.age = 17 | |
submission.can_attend? #=> false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment