Extracting Ghost Load

Episode 183 · March 6, 2014

We’ve used the “ghost object” pattern to lazily load attributes of a model object. And we’ve made a macro to easily declare “ghost-loadable” attribute accessors. Today we complete the generalization of ghost loading by extracting a module that makes it easy for any model object to declare lazily-loaded attributes.

Watch this episode with Graceful.Dev Pro, or in one of the courses below. Already a member? Log in.

Appears in

Tags: , , , , , ,

Responses