Last active
November 27, 2015 08:05
-
-
Save diffused/f1658a616869d5558d62 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
#!/usr/bin/ruby | |
require 'date' | |
class Girl | |
def initialize(name, date_of_birth, weight_in_kg) | |
@name = name | |
@date_of_birth = date_of_birth | |
@weight_in_kg = weight_in_kg | |
end | |
def hello | |
puts "Hello World! My name is #{@name}. I was born on #{@date_of_birth} and weigh #{@weight_in_kg} kg." | |
end | |
end | |
baby_ruby = Girl.new("Ruby Faye Hawkins", Date.new(2015, 11, 26), 2.72) | |
baby_ruby.hello() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment