Created
October 24, 2020 01:39
-
-
Save matoni109/70813e219ce0139a689823a7b0905e40 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 Animal | |
def name(name) | |
@name = name | |
# TODO: what should this method return? | |
self | |
end | |
def species(species) | |
@species = species | |
# TODO: what should this method return? | |
self | |
end | |
def color(color) | |
@color = color | |
# TODO: what should this method return? | |
self | |
end | |
def natural_habitat(natural_habitat) | |
@natural_habitat = natural_habitat | |
# TODO: what should this method return? | |
self | |
end | |
def to_s | |
@color | |
"Name: #{@name}, Species: #{@species}, Color: #{@color}, Natural Habitat: #{@natural_habitat}" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment