class Pry::BlockCommand
A super-class for Commands that are created with a single block.
This class ensures that the block is called with the correct number of arguments and the right context.
Create subclasses using {Pry::CommandSet#command}.
Public Instance Methods
call(*args)
click to toggle source
Call the block that was registered with this command. @param [Array<String>] args The arguments passed @return [Object] The return value of the block
# File lib/pry/block_command.rb, line 14 def call(*args) instance_exec(*normalize_method_args(block, args), &block) end
help()
click to toggle source
# File lib/pry/block_command.rb, line 18 def help "#{command_options[:listing].to_s.ljust(18)} #{description}" end