a guest Aug 23rd, 2019 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- class Dog
- attr_accessor :breed, :color
- def initialize(breed, color)
- @breed = breed
- @color = color
- def kind_of_pet
- puts "Dogs are very loving pets!"
- class Poodle < Dog
- def fur
- puts "Poodles are very fluffy!"
- class Puggle < Poodle
- def mixed
- puts "A Puggle is half poodle, half pug."
- dog = Dog.new('Boxer', 'White')
- poodle = Poodle.new('Poodle', 'Black')
- puggle = Puggle.new('Puggle', 'Brown')
RAW Paste Data