Class: Basketcase::DiffCommand

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



745
746
747
748
749
750
751
752
753
# File 'lib/basketcase.rb', line 745

def execute
  args = ''
  args += ' -graphical' if @graphical
  specified_targets.each do |target|
    cleartool("diff #{args} -predecessor #{target}") do |line|
      puts line
    end
  end
end

#helpObject



737
738
739
740
741
742
743
# File 'lib/basketcase.rb', line 737

def help
  <<EOF
Compare a file to the latest checked-in version.

-g          Graphical display.
EOF
end

#synopsisObject



733
734
735
# File 'lib/basketcase.rb', line 733

def synopsis
  "[-g] <element>"
end