Module: Datamappify::Repository::MappingDSL
- Includes:
 - LazyChecking
 
- Defined in:
 - lib/datamappify/repository/mapping_dsl.rb
 
Instance Method Summary collapse
- #default_provider(provider_name) ⇒ void
 - 
  
    
      #for_entity(entity_class)  ⇒ void 
    
    
  
  
  
  
  
  
  
  
  
    
If the entity is lazy loaded then it assigns the repository itself back to the entity.
 - #map_attribute(name, source) ⇒ void
 
Methods included from LazyChecking
#assign_to_entity, #lazy_load?
Instance Method Details
#default_provider(provider_name) ⇒ void
This method returns an undefined value.
      22 23 24  | 
    
      # File 'lib/datamappify/repository/mapping_dsl.rb', line 22 def default_provider(provider_name) data_mapper.default_provider_name = provider_name.to_s end  | 
  
#for_entity(entity_class) ⇒ void
This method returns an undefined value.
If the entity is lazy loaded then it assigns the repository itself back to the entity
      12 13 14 15 16  | 
    
      # File 'lib/datamappify/repository/mapping_dsl.rb', line 12 def for_entity(entity_class) data_mapper.entity_class = entity_class assign_to_entity if lazy_load? end  | 
  
#map_attribute(name, source) ⇒ void
This method returns an undefined value.
      29 30 31  | 
    
      # File 'lib/datamappify/repository/mapping_dsl.rb', line 29 def map_attribute(name, source) data_mapper.custom_mapping[name] = source end  |