Sha256: 5e21931658e0f29b17ac40044d5bc70fa7b51c6f4bec374768e2fcf1eca7d098
Contents?: true
Size: 902 Bytes
Versions: 5
Compression:
Stored size: 902 Bytes
Contents
# frozen_string_literal: true # # Copyright (c) 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. # require 'forwardable' require_relative 'calculator/calculator' require_relative 'parser/parser' # This module will serve as the top-level entry point for consumers. # You can stick with the API provided here unless you know the internals behind this point. module Differential extend ::Differential::Calculator::Side class << self 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 end end
Version data entries
5 entries across 5 versions & 1 rubygems