Sha256: 6b826e1342ef786336e0bdb2f42671af3d81449787089c77b1a85101864c023f

Contents?: true

Size: 1.13 KB

Versions: 2

Compression:

Stored size: 1.13 KB

Contents

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

class Trepan::SubSubcommand::ShowAutoIrb < Trepan::ShowBoolSubSubcommand
  unless defined?(HELP)
    HELP = "Show if IRB is invoked on debugger stops"
    MIN_ABBREV = 'ir'.size
    NAME       = File.basename(__FILE__, '.rb')
    PREFIX     = %w(show auto irb)
  end

end

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

  # FIXME: DRY the below code
  dbgr, show_cmd = MockDebugger::setup('show')
  testcmdMgr     = Trepan::Subcmd.new(show_cmd)
  auto_cmd       = Trepan::SubSubcommand::ShowAuto.new(dbgr.core.processor, 
                                                       show_cmd)

  cmd_name       = Trepan::SubSubcommand::ShowAutoIrb::PREFIX.join('')
  autox_cmd      = Trepan::SubSubcommand::ShowAutoIrb.new(show_cmd.proc, auto_cmd,
                                                          cmd_name)
  autox_cmd.run([])
  # name = File.basename(__FILE__, '.rb')
  # autox_cmd.summary_help(name)
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
trepanning-0.0.6 processor/command/show_subcmd/auto_subcmd/irb.rb
trepanning-0.0.4 processor/command/show_subcmd/auto_subcmd/irb.rb