Module: Break::Pry

Defined in:
lib/break/pry/commands.rb,
lib/break/pry/frontend.rb,
lib/break/pry/extensions.rb

Defined Under Namespace

Modules: PryExtensions Classes: Frontend

Constant Summary collapse

Commands =
Pry::CommandSet.new do
  create_command "next", "Go to the next line." do
    group "Break"

    banner "      Usage: next\n\n      Step over within the same frame.\n\n      Examples:\n        next #=> Move a line forward.\n    BANNER\n\n    def process\n      pry = defined?(pry_instance) ? pry_instance : _pry_\n      pry.__break_session__[:pry_instance] = pry\n\n\n      command = Break::NextCommand.new(pry.__break_session__)\n      command.execute\n    end\n  end\n\n  create_command \"step\", \"Step into the current line invocation.\" do\n    group \"Break\"\n\n    banner <<-BANNER\n      Usage: step\n\n      Step into a method call.\n\n      Examples:\n        step #=> Step into the method invocation.\n    BANNER\n\n    def process\n      pry = defined?(pry_instance) ? pry_instance : _pry_\n      pry.__break_session__[:pry_instance] = pry\n\n      command = Break::StepCommand.new(pry.__break_session__)\n      command.execute\n    end\n  end\n\n  create_command \"up\", \"Go up a frame.\" do\n    group \"Break\"\n\n    banner <<-BANNER\n      Usage: up\n\n      Go to the frame that called the current one. Can be used only if the\n      command `step` was issued before.\n\n      Examples:\n        up #=> Step into the method invocation.\n    BANNER\n\n    def process\n      pry = defined?(pry_instance) ? pry_instance : _pry_\n      pry.__break_session__[:pry_instance] = pry\n\n      command = Break::UpCommand.new(pry.__break_session__)\n      command.execute\n    end\n  end\n\n  create_command \"down\", \"Go down a frame.\" do\n    group \"Break\"\n\n    banner <<-BANNER\n      Usage: down\n\n      Go to the frame called from the current one. Can be used only if the\n      command `step` was issued before.\n\n      Examples:\n        down #=> Step to the previous frame.\n    BANNER\n\n    def process\n      pry = defined?(pry_instance) ? pry_instance : _pry_\n      pry.__break_session__[:pry_instance] = pry\n\n      command = Break::DownCommand.new(pry.__break_session__)\n      command.execute\n    end\n  end\nend\n"