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



775
776
777
778
779
780
781
782
783
# File 'lib/basketcase.rb', line 775

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



763
764
765
766
767
# File 'lib/basketcase.rb', line 763

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

#option_directoryObject Also known as: option_d



769
770
771
# File 'lib/basketcase.rb', line 769

def option_directory
  @directory_only = true
end

#synopsisObject



759
760
761
# File 'lib/basketcase.rb', line 759

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