Method: RC::Interface#define_config
- Defined in:
- lib/rc/interface.rb
#define_config(tool, options = {}, &block) ⇒ Object Also known as: setup
Define a custom configuration handler.
If the current tool matches the given tool, and autoconfiguration is not being used, then configuration is applied immediately.
168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 |
# File 'lib/rc/interface.rb', line 168 def define_config(tool, ={}, &block) tool = tool.to_s @setup ||= {} if block @setup[tool] = Setup.new(tool, , &block) # REMOVED: Doing this automatically made it impossible for tools to set the profile. #if tool == current_tool # configure_tool(tool) unless autoconfig? #end end @setup[tool] end |