Skip to content

Instantly share code, notes, and snippets.

@elcortez
Created April 18, 2019 16:18
Show Gist options
  • Save elcortez/9f74cdcd0c6c1f5db6b565fab737ab86 to your computer and use it in GitHub Desktop.
Save elcortez/9f74cdcd0c6c1f5db6b565fab737ab86 to your computer and use it in GitHub Desktop.
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