Module: Horza::Entities

Defined in:
lib/horza/entities.rb,
lib/horza/entities/single.rb,
lib/horza/entities/collection.rb

Defined Under Namespace

Classes: Collection, Single

Class Method Summary collapse

Class Method Details

.collection_entitiesObject



16
17
18
# File 'lib/horza/entities.rb', line 16

def collection_entities
  @singles ||= ::Horza.descendants_map(::Horza::Entities::Collection)
end

.collection_entity_for(entity_symbol) ⇒ Object



12
13
14
# File 'lib/horza/entities.rb', line 12

def collection_entity_for(entity_symbol)
  collection_entities[entity_symbol] || ::Horza::Entities::Collection
end

.single_entitiesObject



8
9
10
# File 'lib/horza/entities.rb', line 8

def single_entities
  @singles ||= ::Horza.descendants_map(::Horza::Entities::Single)
end

.single_entity_for(entity_symbol) ⇒ Object



4
5
6
# File 'lib/horza/entities.rb', line 4

def single_entity_for(entity_symbol)
  single_entities[entity_symbol] || ::Horza::Entities::Single
end