Last active
August 29, 2015 13:57
-
-
Save mikekelly/9646486 to your computer and use it in GitHub Desktop.
Greppable, prefixed delegation
This file contains hidden or 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
# un-greppable delegate API | |
class Foo | |
delegate :qux, to: :bar, prefix: true | |
end | |
# possible fixes to the API to make it greppable | |
class Foo | |
delegate :bar_qux, to: :bar, prefixed: true | |
end | |
class Foo | |
delegate :bar_qux, prefixed_with: :bar | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment