Skip to content

Instantly share code, notes, and snippets.

@sebastiangeiger
Created June 4, 2015 13:03
Show Gist options
  • Save sebastiangeiger/1873720f6f0e1600b204 to your computer and use it in GitHub Desktop.
Save sebastiangeiger/1873720f6f0e1600b204 to your computer and use it in GitHub Desktop.
require 'draper'
class Richard
def name
"Richard Whitman"
end
end
class Don < Draper::Decorator
delegate_all
def name
super.reverse
end
end
r = Don.decorate(Richard.new)
s = Don.decorate(Richard.new)
p r.name
p s.name
p r.name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment