class Pry::CommandSet
def create_command(match, description = "No description.", options = {}, &block)
- Yield: - The class body's definition.
Parameters:
-
options
(Hash
) -- The optional configuration parameters, see {#command} -
description
(String
) -- A description of the command. -
match
(String, Regexp
) -- The start of invocations of this command.
def create_command(match, description = "No description.", options = {}, &block) if description.is_a?(Hash) options = description description = "No description." end options = Pry::Command.default_options(match).merge!(options) @commands[match] = Pry::ClassCommand.subclass( match, description, options, helper_module, &block ) @commands[match].class_eval(&block) @commands[match] end