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



467
468
469
470
471
472
473
474
475
# File 'lib/basketcase.rb', line 467

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



459
460
461
462
463
464
465
# File 'lib/basketcase.rb', line 459

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

-g          Graphical display.
EOF
end

#synopsisObject



455
456
457
# File 'lib/basketcase.rb', line 455

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