a guest Sep 17th, 2019 103 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- class Dog < Animal
- attr_reader :weight
- def initialize(name, weight)
- @weight = weight
- fluffy = Dog.new('Fluffy', '5 lbs')
- puts fluffy.name # => 'Fluffy'
- puts fluffy.weight # => '5 lbs'
RAW Paste Data