yeyicheng

Untitled

Apr 14th, 2012
31
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.13 KB | None | 0 0
  1. class Animal
  2.         def to_s
  3.             “Animal: #{@name} -- #{@food}”
  4.         end
  5. end
  6. dog.to_s
  7.  
  8. dog = Animal.new(“dog”, “dogFood”);
Advertisement
Add Comment
Please, Sign In to add comment