class Pry::BlockCommand
Create subclasses using {Pry::CommandSet#command}.
and the right context.
This class ensures that the block is called with the correct number of arguments
A super-class for Commands that are created with a single block.
def call(*args)
-
(Object)
- The return value of the block
Parameters:
-
args
(Array
) -- The arguments passed
def call(*args) instance_exec(*correct_arg_arity(block.arity, args), &block) end
def help
def help "#{command_options[:listing].to_s.ljust(18)} #{description}" end