-
-
Save anonymous/7f60b90f93139eb723e2639c22b416fa 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
animal_index = {"rabbit" => "gray", "mouse" => "gray","dear" => "brown", | |
"bear" => "brown", "sheep" => "white", "flamingo" => "pink", | |
"beetle" => "red", "duck" => "white", "ant" => "black", | |
"donkey" => "brown", "dolphin" => "gray"} | |
class Animal | |
def initialize(name, color) | |
@name = name | |
@color = color | |
end | |
def self.listunderfive | |
if name.size < 5 | |
puts "#{name} has less than 5 characters" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment