Class: Maglove::Engine::Registry

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/maglove/engine/registry.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeRegistry

Returns a new instance of Registry.



7
8
9
# File 'lib/maglove/engine/registry.rb', line 7

def initialize
  @widgets = {}
end

Instance Attribute Details

#widgetsObject (readonly)

Returns the value of attribute widgets.



5
6
7
# File 'lib/maglove/engine/registry.rb', line 5

def widgets
  @widgets
end

Instance Method Details

#register_widget(identifier, klass) ⇒ Object



11
12
13
# File 'lib/maglove/engine/registry.rb', line 11

def register_widget(identifier, klass)
  widgets[identifier] = klass
end