Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Player
- def initialize birthdate
- @birthdate = birthdate
- end
- def is_old_enough?
- birthdate < Date.today-18.years
- end
- end
- ###############
- player = Player.new params[:birthdate]
- player.is_old_enough?
Add Comment
Please, Sign In to add comment