Module: Differential
- Extended by:
- Calculator::Side
- Defined in:
- lib/differential/version.rb,
lib/differential/differential.rb,
lib/differential/parser/reader.rb,
lib/differential/parser/record.rb,
lib/differential/calculator/item.rb,
lib/differential/calculator/side.rb,
lib/differential/calculator/group.rb,
lib/differential/calculator/report.rb,
lib/differential/calculator/totals.rb,
lib/differential/calculator/has_totals.rb
Overview
Copyright © 2018-present, Blue Marble Payroll, LLC
This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree.
Defined Under Namespace
Modules: Calculator, Parser
Constant Summary collapse
- VERSION =
'1.0.2'
Constants included from Calculator::Side
Calculator::Side::A, Calculator::Side::B
Class Method Summary collapse
Class Method Details
.calculate(dataset_a: [], dataset_b: [], reader_config: {}) ⇒ Object
21 22 23 24 25 26 27 28 29 |
# File 'lib/differential/differential.rb', line 21 def calculate(dataset_a: [], dataset_b: [], reader_config: {}) reader = ::Differential::Parser::Reader.new(reader_config) report = ::Differential::Calculator::Report.new reader.each(dataset_a) { |record| report.add(record, A) } reader.each(dataset_b) { |record| report.add(record, B) } report end |