Last active
August 29, 2015 14:22
-
-
Save sebastiangeiger/1c74a34bd4e2a925de1d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
Fix: