Sha256: 595985c6af2b9c98d9490100a35b292edf93d2187043123968dadafeddff1901

Contents?: true

Size: 944 Bytes

Versions: 4

Compression:

Stored size: 944 Bytes

Contents

# -*- coding: utf-8 -*-
# Copyright (C) 2010 Rocky Bernstein <rockyb@rubyforge.net>
require_relative '../base/subcmd'

class Trepan::Subcommand::ReloadCommand < Trepan::Subcommand
  unless defined?(HELP)
    HELP         = 'Reload debugger commmands from debugger directories'
    MIN_ABBREV   = 'co'.size # Note we have "info file"
    NAME         = File.basename(__FILE__, '.rb')
    NEED_STACK   = true
    PREFIX       = %w(reload command)
  end

  def run(args)
    @proc.load_cmds_initialize
    msg('Debugger commands reloaded.')
  end

end

if __FILE__ == $0
  # Demo it.
  require_relative '../../mock'
  require_relative '../../subcmd'
  name = File.basename(__FILE__, '.rb')

  # FIXME: DRY the below code
  dbgr, cmd  = MockDebugger::setup('reload')
  subcommand = Trepan::Subcommand::ReloadCommand.new(cmd)
  testcmdMgr = Trepan::Subcmd.new(subcommand)

  name = File.basename(__FILE__, '.rb')
  subcommand.summary_help(name)
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
trepanning-0.0.9 processor/command/reload_subcmd/command.rb
trepanning-0.0.8 processor/command/reload_subcmd/command.rb
trepanning-0.0.6 processor/command/reload_subcmd/command.rb
trepanning-0.0.4 processor/command/reload_subcmd/command.rb