Sha256: f803a36a380f7bfe965ed3b0c566de9b255e7ea848afb527beb25606d70e2b2d

Contents?: true

Size: 680 Bytes

Versions: 1

Compression:

Stored size: 680 Bytes

Contents

# frozen_string_literal: true

#
# Copyright (c) 2019-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 Proforma
  class ExtendedEvaluator
    # This class is also meant to be plugged into Stringento to provide value resolution.
    class Resolver
      DEFAULT_SEPARATOR = '.'

      attr_reader :objectable_resolver

      def initialize(separator: DEFAULT_SEPARATOR)
        @objectable_resolver = Objectable.resolver(separator: separator)
      end

      def resolve(value, input)
        objectable_resolver.get(input, value)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
proforma-extended-evaluator-1.1.0 lib/proforma/extended_evaluator/resolver.rb