Method: Filigree::Commands::ClassMethods#config
- Defined in:
- lib/filigree/commands.rb
#config(&block) ⇒ void
This method returns an undefined value.
This will generate an anonymous Filigree::Configuration class for this command. After a string resolves to the next command defined the remainder of the command line will be passed to an instance of this Configuration class. Any remaining text is then provided to the command as usual.
The variables defined in the configuration class are available in the command’s block.
118 119 120 121 |
# File 'lib/filigree/commands.rb', line 118 def config(&block) @config = Class.new { include Filigree::Configuration } @config.instance_exec &block end |