Class: Inch::CLI::Command::Diff
Instance Attribute Summary
Attributes inherited from Base
#codebase
Instance Method Summary
collapse
#git, #sh
Methods inherited from Base
#initialize, #name, register_command_as, run
#ui
Instance Method Details
#description ⇒ Object
13
14
15
|
# File 'lib/inch/cli/command/diff.rb', line 13
def description
'Shows a diff'
end
|
#run(*args) ⇒ Object
21
22
23
24
25
26
27
28
29
|
# File 'lib/inch/cli/command/diff.rb', line 21
def run(*args)
@options.parse(args)
@options.verify
before_rev, after_rev = revisions[0], revisions[1]
diff = API::Diff.new(work_dir, before_rev, after_rev)
Output::Diff.new(@options, diff.comparer)
end
|
#usage ⇒ Object
17
18
19
|
# File 'lib/inch/cli/command/diff.rb', line 17
def usage
'Usage: inch diff [REV..[REV]] [options]'
end
|