Created
May 13, 2016 16:49
-
-
Save jesuslerma/8214e76105022c389727e2d6b1d2ef56 to your computer and use it in GitHub Desktop.
baby.rb
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 Baby < RubyProgrammer | |
attr_accessor :age, :gender, :name | |
after_create :dad_will_be_happy | |
def dad_will_be_happy | |
puts 'Wohoo he\'s a boy' | |
end | |
end | |
my_baby = Baby.new | |
my_baby.age = 0 | |
my_baby.gender = "macho alfa" | |
my_baby.name = "Ian Jesus" | |
my_baby.save |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Felicidades naco.