Module: FFWD::Plugin::ClassMethods

Defined in:
lib/ffwd/plugin.rb

Instance Method Summary collapse

Instance Method Details

#register_plugin(name, opts = {}) ⇒ Object



88
89
90
91
92
93
94
95
96
97
98
99
# File 'lib/ffwd/plugin.rb', line 88

def register_plugin(name, opts={})
  config = {
    :mod => self,
    :description => opts[:description],
    :options => opts[:options] || []
  }

  config[:setup_input_method_name] = (opts[:setup_input_method] || :setup_input)
  config[:setup_output_method_name] = (opts[:setup_output_method] || :setup_output)

  FFWD::Plugin.discovered[name] = config
end