hello gist?
Created
July 25, 2008 02:31
-
-
Save beccasaurus/2364 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 Dog | |
attr_accessor :name, :breed | |
def initialize options = {} | |
options.each {|k,v| instance_variable_set "@#{k}", v } | |
end | |
def bark | |
puts "woof! my name is #{name} and i am a #{breed}" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment