Class: AmsLazyRelationships::Loaders::Direct
- Defined in:
- lib/ams_lazy_relationships/loaders/direct.rb
Overview
Lazy loads data in a “dumb” way - just executes the provided block when needed
Instance Method Summary collapse
-
#initialize(relationship_name, &load_block) ⇒ Direct
constructor
A new instance of Direct.
Methods inherited from Base
Constructor Details
#initialize(relationship_name, &load_block) ⇒ Direct
Returns a new instance of Direct.
14 15 16 17 |
# File 'lib/ams_lazy_relationships/loaders/direct.rb', line 14 def initialize(relationship_name, &load_block) @relationship_name = relationship_name @load_block = load_block end |