Created
January 19, 2009 21:02
-
-
Save apeckham/49172 to your computer and use it in GitHub Desktop.
Delegate all methods
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
class BrowsePage | |
attr_reader :collection | |
def initialize(collection) | |
@collection = collection | |
end | |
def method_missing(method, *args, &block) | |
@collection.send method, *args, &block | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment