Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
README.md
coffee_class.rb
coffee_method_missing.rb
coffee_plain_old_ruby_object.rb
decorator_pattern.svg
decorator_pattern_example.svg
main.rb

README.md

this is an example of decorator pattern written in Ruby

  • coffee_plain_old_ruby_object.rb uses the JAVA style, so called plain old ruby oject
  • coffee_method_missing.rb using the ruby specific method_missing trick

how to run: ruby main.rb 1 # method_missing ruby main.rb 0 # plain old ruby object

decorator pattern UML

decorator pattern example UML

You can’t perform that action at this time.