Lazy loading of adapter #9

jnunemaker opened this Issue Nov 7, 2012 · 0 comments


None yet
1 participant

jnunemaker commented Nov 7, 2012

Right now you need an instance that is all setup and ready to go to pass to the adapter method. I'm thinking we should allow a block which will get yielded and memoized on first call. This will allow for lazy loading of things.

class User
  include Toy::Store
  adapter { some_adapter_instance }

@ghost ghost assigned jnunemaker Nov 7, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment