Instantly share code, notes, and snippets.

@Sihui /waffle.rb
Last active Jul 16, 2017

Embed
What would you like to do?
Design Pattern: Decorator and Waffle
class Waffle
attr_reader :waffle
def initialize
@waffle = 'This is a waffle'
end
def serve
puts waffle
end
def eat
puts 'Eat a bit of the waffle'
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment