Method: Filigree::Commands::ClassMethods#command

Defined in:
lib/filigree/commands.rb

#command(str, &block) ⇒ void

This method returns an undefined value.

Add a new command to the class. All command code is executed in the context of the Commands object.

Parameters:

  • str (String)

    Name of the command

  • block (Proc)

    Code to be executed when the command is run



112
113
114
115
116
117
118
# File 'lib/filigree/commands.rb', line 112

def command(str, &block)
	add_command Command.new(str, @help_string, @param_docs, @config, block)

	@help_string = ''
	@param_docs  = Array.new
	@config      = nil
end