module Horza::Entities

Public Class Methods

collection_entities() click to toggle source
# File lib/horza/entities.rb, line 18
def collection_entities
  @collections ||= ::Horza.descendants_map(::Horza::Entities::Collection)
end
collection_entity_for(entity_symbol, attributes) click to toggle source
# File lib/horza/entities.rb, line 13
def collection_entity_for(entity_symbol, attributes)
  klass = collection_entities[entity_symbol] || Horza.adapter.collection_entity_klass
  klass.new(attributes)
end
single_entities() click to toggle source
# File lib/horza/entities.rb, line 9
def single_entities
  @singles ||= ::Horza.descendants_map(::Horza::Entities::Single)
end
single_entity_for(entity_symbol, attributes) click to toggle source
# File lib/horza/entities.rb, line 4
def single_entity_for(entity_symbol, attributes)
  klass = single_entities[entity_symbol] || Horza.adapter.single_entity_klass
  klass.new(attributes)
end