SHARE
TWEET

Untitled

a guest Oct 14th, 2019 76 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class Animal
  2.     attr_reader :name, :sound
  3.  
  4.     def initialize(name)
  5.         @name = name
  6.     end
  7.  
  8.     def talk
  9.         return @name
  10.     end
  11.  
  12.     def eat(food)
  13.         return "#{@name} eats #{food}."
  14.     end
  15.  
  16.     def self.phyla
  17.         return ['Ecdysozoa', 'Lophotrochozoa', 'Radiata', 'Deuterostomia']
  18.     end
  19. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top