class Pry::CommandSet

def block_command(match, description = "No description.", options = {}, &block)

Other tags:
    Example: Regexp command -

Other tags:
    Yield: - The action to perform. The parameters in the block

Options Hash: (**options)
  • :shellwords (Boolean) -- Whether the command's arguments
  • :use_prefix (Boolean) -- Whether the command uses
  • :listing (String) -- The listing name of the
  • :interpolate (Boolean) -- Whether string #{} based
  • :keep_retval (Boolean) -- Whether or not to use return value

Parameters:
  • options (Hash) -- The optional configuration parameters.
  • description (String) -- A description of the command.
  • match (String, Regexp) -- The start of invocations of this command.
def block_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::BlockCommand.subclass(
    match, description, options, helper_module, &block
  )
end