Created
April 18, 2019 16:18
-
-
Save elcortez/9f74cdcd0c6c1f5db6b565fab737ab86 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
attr_reader :name | |
def initialize(name) | |
@name = name | |
end | |
def self.phyla | |
%w[ | |
Ecdysozoa | |
Lophotrochozoa | |
Radiata | |
Deuterostomia | |
] | |
end | |
def eat(food) | |
"#{name} eats #{food}" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment