Sha256: 6084af58edba3b46853850ef5a48d235cebddb181362bf5e8043ad3411f0adf9

Contents?: true

Size: 883 Bytes

Versions: 9

Compression:

Stored size: 883 Bytes

Contents

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

class Trepan::SubSubcommand::SetMax < Trepan::SubSubcommandMgr
  unless defined?(HELP)
    Trepanning::Subcommand.set_name_prefix(__FILE__, self)
    HELP   = 'Set maximum length for things which may have unbounded size'
  end

  # def run(args)
  #   puts "foo"
  #   require 'trepanning'
  #   Trepan.debug
  #   super
  # end
end

if __FILE__ == $0
  # Demo it.
  require_relative '../../mock'
  dbgr, parent_cmd = MockDebugger::setup('set', false)
  cmd              = Trepan::SubSubcommand::SetMax.new(dbgr.core.processor, 
                                                       parent_cmd)
  cmd.run(cmd.prefix + ['string', '30'])

  %w(s lis foo).each do |prefix|
    p [prefix, cmd.complete(prefix)]
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
trepanning-2.15.35 processor/command/set_subcmd/max.rb
trepanning-1.93.35 processor/command/set_subcmd/max.rb
trepanning-2.15.33 processor/command/set_subcmd/max.rb
trepanning-1.93.32 processor/command/set_subcmd/max.rb
trepanning-0.1.6 processor/command/set_subcmd/max.rb
trepanning-0.1.4 processor/command/set_subcmd/max.rb
trepanning-0.1.3 processor/command/set_subcmd/max.rb
trepanning-0.1.2 processor/command/set_subcmd/max.rb
trepanning-0.1.1 processor/command/set_subcmd/max.rb