Sha256: 44121175d1d1bd7d30457b1655edcd12d961c55182f24d52488919518affdc6d
Contents?: true
Size: 1020 Bytes
Versions: 2
Compression:
Stored size: 1020 Bytes
Contents
# -*- coding: utf-8 -*- # Copyright (C) 2010 Rocky Bernstein <rockyb@rubyforge.net> require_relative '../base/subcmd' class Trepan::Subcommand::SetBasename < Trepan::SetBoolSubcommand unless defined?(HELP) HELP = "Set to show only file basename in showing file names" IN_LIST = true MIN_ABBREV = 'ba'.size NAME = File.basename(__FILE__, '.rb') PREFIX = %w(set basename) end end if __FILE__ == $0 # Demo it. require_relative '../../mock' name = File.basename(__FILE__, '.rb') # FIXME: DRY the below code dbgr, cmd = MockDebugger::setup('set') subcommand = Trepan::Subcommand::SetBasename.new(cmd) testcmdMgr = Trepan::Subcmd.new(subcommand) subcommand.run_show_bool subcommand.summary_help(name) # require 'trepanning' # Trepan.debug(:set_restart => true) subcommand.run(['set', name]) subcommand.run(['set', name, 'off']) subcommand.run(['set', name, 'on']) subcommand.summary_help(name) puts puts '-' * 20 puts subcommand.save_command end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
trepanning-0.0.6 | processor/command/set_subcmd/basename.rb |
trepanning-0.0.4 | processor/command/set_subcmd/basename.rb |