Module: Ironfan::Pluggable

Defined in:
lib/ironfan/plugin/base.rb

Instance Method Summary collapse

Instance Method Details

#add_plugin(name, cls) ⇒ Object


13
14
15
# File 'lib/ironfan/plugin/base.rb', line 13

def add_plugin name, cls
  registry[name] = cls
end

#plugin_for(name) ⇒ Object


16
17
18
# File 'lib/ironfan/plugin/base.rb', line 16

def plugin_for name
  registry[name]
end

#registryObject


19
# File 'lib/ironfan/plugin/base.rb', line 19

def registry() @registry ||= {}; end