Created
March 18, 2010 17:54
-
-
Save tal/336641 to your computer and use it in GitHub Desktop.
Would something like this work with Forwardable?
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 Foo << Sequel::Model | |
| extend Forwardable | |
| def bar | |
| @bar ||= Bar.find(bar_id) | |
| end | |
| def_delegators :bar, :my, :bar, :methods | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment