Advertisement
Guest User

Untitled

a guest
Sep 15th, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. class Talking_cat
  2. attr_accessor :name
  3.  
  4. def meow
  5. puts "Meow, I'm #{@name}"
  6. end
  7. end
  8.  
  9. talking_cat = Talking_cat.new
  10. talking_cat.name = "Roux"
  11. talking_cat.meow # => "Meow, I'm Roux"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement