Skip to content

Instantly share code, notes, and snippets.

@mikekelly
Last active August 29, 2015 13:57
Show Gist options
  • Save mikekelly/9646486 to your computer and use it in GitHub Desktop.
Save mikekelly/9646486 to your computer and use it in GitHub Desktop.
Greppable, prefixed delegation
# 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