Created
August 10, 2015 15:09
-
-
Save lantrinhca/1a346d940e61d80a8e9e to your computer and use it in GitHub Desktop.
Animal
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 :breed, :weight | |
def initialize(breed, weight) | |
@breed = breed | |
@weight = weight | |
end | |
def output | |
puts "The kind of dog is #{self.breed} and weight #{self.weight}lbs" | |
end | |
end | |
dog = Dog.new("German shepherd", 30) | |
dog.output |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment