Method: Para::Config.method_missing
- Defined in:
- lib/para/config.rb
.method_missing(method_name, *args, &block) ⇒ Object
Allows accessing plugins root module to configure them through a method from the Para::Config class.
Example :
Para.config do |config|
config.my_plugin.my_var = 'foo'
end
75 76 77 78 79 80 81 82 |
# File 'lib/para/config.rb', line 75 def self.method_missing(method_name, *args, &block) if plugins.include?(method_name) plugin = Para::Plugins.module_name_for(method_name).constantize block ? block.call(plugin) : plugin else super end end |