Sha256: 606432ee2e543adc826f0afff68f5253f1f0964ca67c8732725d334fcf892e32

Contents?: true

Size: 624 Bytes

Versions: 3

Compression:

Stored size: 624 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.
#

module TreeBranch
  # This is the base class for all plug in comparators.  Derive subclasses from this class
  # and declare them when calling ::TreeBranch::Node#process or ::TreeBranch#process.
  class Comparator
    attr_reader :data, :context

    def initialize(data: {}, context: {})
      @data     = data    || {}
      @context  = context || {}
    end

    def valid?
      false
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
tree_branch-1.1.1 lib/tree_branch/comparator.rb
tree_branch-1.1.0 lib/tree_branch/comparator.rb
tree_branch-1.0.0 lib/tree_branch/comparator.rb