Lazy loading of adapter #9

Open
jnunemaker opened this Issue Nov 7, 2012 · 0 comments

Comments

Projects
None yet
1 participant
Owner

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 }
end

@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