Skip to content

Instantly share code, notes, and snippets.

@sebastiangeiger
Last active August 29, 2015 14:22
Show Gist options
  • Save sebastiangeiger/1c74a34bd4e2a925de1d to your computer and use it in GitHub Desktop.
Save sebastiangeiger/1c74a34bd4e2a925de1d 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
@stevenharman
Copy link

WAT?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment