-
-
Save chaudhary27/f33d93824877f8f36a4d to your computer and use it in GitHub Desktop.
Quiz_2_OOP
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, :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