Skip to content

Instantly share code, notes, and snippets.

@tal
Created March 18, 2010 17:54
Show Gist options
  • Select an option

  • Save tal/336641 to your computer and use it in GitHub Desktop.

Select an option

Save tal/336641 to your computer and use it in GitHub Desktop.
Would something like this work with Forwardable?
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