Module: Datamappify::Repository::LazyChecking
- Included in:
- MappingDSL
- Defined in:
- lib/datamappify/repository/lazy_checking.rb
Instance Method Summary collapse
-
#assign_to_entity ⇒ void
Assign the repository itself to the lazy entity.
-
#lazy_load? ⇒ Boolean
Is the repository for an entity that requires lazy loading?.
Instance Method Details
#assign_to_entity ⇒ void
This method returns an undefined value.
Assign the repository itself to the lazy entity
14 15 16 |
# File 'lib/datamappify/repository/lazy_checking.rb', line 14 def assign_to_entity data_mapper.entity_class.repository = self end |
#lazy_load? ⇒ Boolean
Is the repository for an entity that requires lazy loading?
7 8 9 |
# File 'lib/datamappify/repository/lazy_checking.rb', line 7 def lazy_load? data_mapper.entity_class.included_modules.include?(Datamappify::Lazy) end |