Module: Yaoc::MapperRegistry
- Defined in:
- lib/yaoc/mapper_registry.rb
Class Method Summary collapse
Class Method Details
.add(key, mapper) ⇒ Object
13 14 15 |
# File 'lib/yaoc/mapper_registry.rb', line 13 def add(key, mapper) scope[key.to_sym] = mapper end |
.for(key) ⇒ Object
17 18 19 |
# File 'lib/yaoc/mapper_registry.rb', line 17 def for(key) scope[key.to_sym] end |
.scope ⇒ Object
9 10 11 |
# File 'lib/yaoc/mapper_registry.rb', line 9 def scope @scope ||= ScopedStorage::Scope.new("mappings") end |
.scope_storage(new_storage) ⇒ Object
5 6 7 |
# File 'lib/yaoc/mapper_registry.rb', line 5 def scope_storage(new_storage) @scope = ScopedStorage::Scope.new("mappings", new_storage) end |