1
0
Fork 0
mirror of https://github.com/pry/pry.git synced 2022-11-09 12:35:05 -05:00

Add an add_command method to command sets

This is to accomodate people who want to make their own Command
subclasses
This commit is contained in:
Conrad Irwin 2012-04-01 16:09:40 -07:00
parent 4fe5f70447
commit 7c5d55d354

View file

@ -152,6 +152,12 @@ class Pry
@commands.each(&block)
end
# Add a given command object to this set.
# @param Command the subclass of Pry::Command you wish to add.
def add_command(command)
commands[command.match] = command
end
# Removes some commands from the set
# @param [Array<String>] searches the matches or listings of the commands to remove
def delete(*searches)