Module: Smartdict::Core::IsManager::ClassMethods
- Defined in:
- lib/smartdict/core/is_manager.rb
Instance Method Summary collapse
Instance Method Details
#all ⇒ Object
17 18 19 |
# File 'lib/smartdict/core/is_manager.rb', line 17 def all @entities end |
#find(name) ⇒ Object
13 14 15 |
# File 'lib/smartdict/core/is_manager.rb', line 13 def find(name) @entities[name.to_s] end |
#register(name, klass) ⇒ Object
8 9 10 11 |
# File 'lib/smartdict/core/is_manager.rb', line 8 def register(name, klass) raise Smartdict::Error.new("`#{name}` is already registered") if find(name) @entities[name.to_s] = klass end |