Class: PVN::Pct::Differ
- Inherits:
-
Object
- Object
- PVN::Pct::Differ
- Includes:
- Loggable
- Defined in:
- lib/pvn/pct/differ.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(options) ⇒ Differ
constructor
A new instance of Differ.
- #show_diff_counts(options) ⇒ Object
Constructor Details
#initialize(options) ⇒ Differ
Returns a new instance of Differ.
10 11 12 |
# File 'lib/pvn/pct/differ.rb', line 10 def initialize show_diff_counts end |
Instance Method Details
#show_diff_counts(options) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/pvn/pct/differ.rb', line 14 def show_diff_counts paths = .paths paths = %w{ . } if paths.empty? info "paths: #{paths}" total = PVN::DiffCount.new 0, 0, 'total' paths.each do |path| diff_counts = get_diff_counts path, diff_counts.each do |dc| total << dc dc.print end end total.print end |