pry--pry/lib/pry/extended_commands/experimental.rb

17 lines
407 B
Ruby

class Pry
module ExtendedCommands
Experimental = Pry::CommandSet.new do
command "reload-method", "Reload the source specifically for a method", :requires_gem => "method_reload" do |meth_name|
if (meth = get_method_object(meth_name, target, {})).nil?
output.puts "Invalid method name: #{meth_name}."
next
end
meth.reload
end
end
end
end