Class: Inch::CLI::Command::Output::Diff
- Extended by:
- Forwardable
- Defined in:
- lib/inch/cli/command/output/diff.rb
Instance Attribute Summary collapse
-
#comparer ⇒ Object
readonly
Returns the value of attribute comparer.
Instance Method Summary collapse
-
#initialize(options, comparer) ⇒ Diff
constructor
A new instance of Diff.
Methods inherited from Base
#print_file_info, #priority_arrow
Methods included from TraceHelper
Constructor Details
#initialize(options, comparer) ⇒ Diff
Returns a new instance of Diff.
12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/inch/cli/command/output/diff.rb', line 12 def initialize(, comparer) @options = @comparer = comparer added = @comparer.added_objects improved = @comparer.improved_objects degraded = @comparer.degraded_objects if added.empty? && improved.empty? && degraded.empty? ui.trace "No changes." else show(added, improved, degraded) end end |
Instance Attribute Details
#comparer ⇒ Object (readonly)
Returns the value of attribute comparer.
8 9 10 |
# File 'lib/inch/cli/command/output/diff.rb', line 8 def comparer @comparer end |