Skip to content

Instantly share code, notes, and snippets.

@chaudhary27
Created August 6, 2015 23:30
Show Gist options
  • Save chaudhary27/f33d93824877f8f36a4d to your computer and use it in GitHub Desktop.
Save chaudhary27/f33d93824877f8f36a4d to your computer and use it in GitHub Desktop.
Quiz_2_OOP
class Dog
attr_accessor :name, :kind
def initialize(name, kind)
@name = name
@kind = kind
end
def output_details
puts "This dog\'s name is #{@name} and its kind is #{@kind}"
end
end
dog = Dog.new("gerry", :poodle)
dog.output_details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment