Method: Pry::CommandSet#block_command
- Defined in:
- lib/pry/command_set.rb
#block_command(match, description = "No description.", options = {}) { ... } ⇒ Object Also known as: command
Defines a new Pry command.
78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/pry/command_set.rb', line 78 def block_command(match, description = "No description.", = {}, &block) if description.is_a?(Hash) = description description = "No description." end = Pry::Command.(match).merge!() @commands[match] = Pry::BlockCommand.subclass( match, description, , helper_module, &block ) end |