Class: Rubernate::LazyLoader
- Inherits:
-
Object
- Object
- Rubernate::LazyLoader
- Defined in:
- lib/rubernate/lazyload.rb
Overview
Base class and default implementation for lazy loaders. Loads each objects separately.
Direct Known Subclasses
Instance Method Summary collapse
-
#create(obj_pk, p_name) ⇒ Object
Creates LazyLoader * obj_pk - object that holds reference to object that is supposed to be load lazily.
- #load_lazy(obj) ⇒ Object
Instance Method Details
#create(obj_pk, p_name) ⇒ Object
Creates LazyLoader
-
obj_pk - object that holds reference to object that is supposed to be load lazily.
-
p_name - name of reference(or collection) parameter that referes to object that is to be loaded lazily.
12 13 14 |
# File 'lib/rubernate/lazyload.rb', line 12 def create obj_pk, p_name @@single_lazy_loader end |