Class: Basketcase::LogCommand

Inherits:
Command
  • Object
show all
Defined in:
lib/basketcase.rb

Instance Attribute Summary

Attributes inherited from Command

#comment, #listener, #targets

Instance Method Summary collapse

Methods inherited from Command

#accept_args, #effective_targets, #initialize, #option_comment, #option_graphical, #option_recurse, #report, #specified_targets

Methods included from Utils

#mkpath

Constructor Details

This class inherits a constructor from Basketcase::Command

Instance Method Details

#executeObject



497
498
499
500
501
502
503
504
505
# File 'lib/basketcase.rb', line 497

def execute
  args = ''
  args += ' -recurse' if @recursive
  args += ' -directory' if @directory_only
  args += ' -graphical' if @graphical
  cleartool("lshistory #{args} #{effective_targets}") do |line|
    puts line
  end
end

#helpObject



485
486
487
488
489
# File 'lib/basketcase.rb', line 485

def help
  <<EOF
List the history of specified elements.
EOF
end

#option_directoryObject Also known as: option_d



491
492
493
# File 'lib/basketcase.rb', line 491

def option_directory
  @directory_only = true
end

#synopsisObject



481
482
483
# File 'lib/basketcase.rb', line 481

def synopsis
  "[<element> ...]"
end