Class: Maglove::Engine::Registry
- Inherits:
-
Object
- Object
- Maglove::Engine::Registry
- Includes:
- Singleton
- Defined in:
- lib/maglove/engine/registry.rb
Instance Attribute Summary collapse
-
#widgets ⇒ Object
readonly
Returns the value of attribute widgets.
Instance Method Summary collapse
-
#initialize ⇒ Registry
constructor
A new instance of Registry.
- #register_widget(identifier, klass) ⇒ Object
Constructor Details
#initialize ⇒ Registry
Returns a new instance of Registry.
7 8 9 |
# File 'lib/maglove/engine/registry.rb', line 7 def initialize @widgets = {} end |
Instance Attribute Details
#widgets ⇒ Object (readonly)
Returns the value of attribute widgets.
5 6 7 |
# File 'lib/maglove/engine/registry.rb', line 5 def @widgets end |
Instance Method Details
#register_widget(identifier, klass) ⇒ Object
11 12 13 |
# File 'lib/maglove/engine/registry.rb', line 11 def (identifier, klass) [identifier] = klass end |