Module: Horza
- Extended by:
- Configuration
- Defined in:
- lib/horza.rb,
lib/horza/errors.rb,
lib/horza/entities.rb,
lib/horza/configuration.rb,
lib/horza/entities/single.rb,
lib/horza/adapters/options.rb,
lib/horza/entities/collection.rb,
lib/horza/adapters/active_record.rb,
lib/horza/adapters/class_methods.rb,
lib/horza/core_extensions/string.rb,
lib/horza/adapters/abstract_adapter.rb,
lib/horza/adapters/instance_methods.rb
Defined Under Namespace
Modules: Adapters, Configuration, CoreExtensions, Entities, Errors Classes: Config
Class Method Summary collapse
Methods included from Configuration
adapter, adapter_map, configuration, configure, reset
Class Method Details
.adapt(klass) ⇒ Object
22 23 24 |
# File 'lib/horza.rb', line 22 def adapt(klass) adapter.new(klass) end |
.descendants_map(klass) ⇒ Object
18 19 20 |
# File 'lib/horza.rb', line 18 def descendants_map(klass) klass.descendants.reduce({}) { |hash, (klass)| hash.merge(klass.name.split('::').last.underscore.to_sym => klass) } end |