SHARE
TWEET

Untitled

a guest Sep 20th, 2019 82 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class Dog
  2.   def initialize(name)
  3.     @name = name
  4.     @weight = weight
  5.   end
  6.  
  7.   def bark
  8.     "#{name} says woof!"
  9.   end
  10.  
  11.   def change_info(name, weight)
  12.     self.name = name
  13.     self.weight = weight
  14.   end
  15.  
  16.   private
  17.  
  18.   attr_accessor :name, :weight
  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