Class: HledgerForecast::Comparator

Inherits:
Object
  • Object
show all
Defined in:
lib/hledger_forecast/comparator.rb

Overview

Compare the output of two CSV files

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeComparator

Returns a new instance of Comparator.



4
5
6
# File 'lib/hledger_forecast/comparator.rb', line 4

def initialize
  @table = Terminal::Table.new
end

Class Method Details

.compare(file1, file2) ⇒ Object



8
9
10
# File 'lib/hledger_forecast/comparator.rb', line 8

def self.compare(file1, file2)
  new.compare(file1, file2)
end

Instance Method Details

#compare(file1, file2) ⇒ Object



12
13
14
# File 'lib/hledger_forecast/comparator.rb', line 12

def compare(file1, file2)
  compare_csvs(file1, file2)
end