Class: PVN::Diff::Command

Inherits:
Command::Command show all
Defined in:
lib/pvn/diff/command.rb

Instance Method Summary collapse

Methods inherited from Command::Command

description, example, getdoc, #initialize, matches_subcommand?, optscls, optset, #show_help, subcommands, summary, #to_doc, usage

Constructor Details

This class inherits a constructor from PVN::Command::Command

Instance Method Details

#init(options) ⇒ Object



34
35
36
37
38
39
40
41
42
43
44
# File 'lib/pvn/diff/command.rb', line 34

def init options
  if options.revision && options.change
    raise PVN::OptionException.new "diff does not accept both revision '#{options.revision}' and change '#{options.change}' values"
  end

  if options.revision || options.change
    differ = RepositoryDiffer.new options
  else
    differ = LocalDiffer.new options
  end
end