Skip to content

Instantly share code, notes, and snippets.

@jesuslerma
Created May 13, 2016 16:49
Show Gist options
  • Save jesuslerma/8214e76105022c389727e2d6b1d2ef56 to your computer and use it in GitHub Desktop.
Save jesuslerma/8214e76105022c389727e2d6b1d2ef56 to your computer and use it in GitHub Desktop.
baby.rb
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
@EduardoIbarra
Copy link

Felicidades naco.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment