Class: TroleGroups::Macros::Configuration::StorageLoader
- Inherits:
-
BaseLoader
- Object
- BaseLoader
- TroleGroups::Macros::Configuration::StorageLoader
- Defined in:
- lib/trole_groups/macros/configuration/storage_loader.rb
Instance Attribute Summary
Attributes inherited from BaseLoader
Instance Method Summary collapse
-
#initialize(strategy, orm) ⇒ StorageLoader
constructor
A new instance of StorageLoader.
- #storage_class ⇒ Object
Methods inherited from BaseLoader
#base_class, #namespace, #orm_namespace, #try_module
Constructor Details
#initialize(strategy, orm) ⇒ StorageLoader
Returns a new instance of StorageLoader.
5 6 7 |
# File 'lib/trole_groups/macros/configuration/storage_loader.rb', line 5 def initialize strategy, orm super end |
Instance Method Details
#storage_class ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/trole_groups/macros/configuration/storage_loader.rb', line 9 def storage_class begin "#{orm_namespace}::Storage::#{strategy.to_s.camelize}".constantize rescue # use generic if no ORM specific strategy found! "#{namespace}::Storage::#{strategy.to_s.camelize}".constantize end end |