Advertisement
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
- end
- def output_dog
- puts "a #{@color} #{@breed} is a dog"
- end
- end
- dog = Dog.new(:lab, :black)
- puts dog
- dog.output_dog
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement