Skip to content

Instantly share code, notes, and snippets.

@mikekelly
Last active Aug 29, 2015
Embed
What would you like to do?
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