Sha256: 1edafdaa458001ef77ae47a2c62a93ce46fee031c4156e91724956000f4889e6

Contents?: true

Size: 602 Bytes

Versions: 9

Compression:

Stored size: 602 Bytes

Contents

# frozen_string_literal: true

module Aws
  module Endpoints
    # @api private
    class Rule
      # Resolves a value that is a function, reference, or template string.
      def resolve_value(value, parameters, assigns)
        if value.is_a?(Hash) && value['fn']
          Function.new(fn: value['fn'], argv: value['argv'])
                  .call(parameters, assigns)
        elsif value.is_a?(Hash) && value['ref']
          Reference.new(ref: value['ref']).resolve(parameters, assigns)
        else
          Templater.resolve(value, parameters, assigns)
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
aws-sdk-core-3.168.4 lib/aws-sdk-core/endpoints/rule.rb
aws-sdk-core-3.168.3 lib/aws-sdk-core/endpoints/rule.rb
aws-sdk-core-3.168.2 lib/aws-sdk-core/endpoints/rule.rb
aws-sdk-core-3.168.1 lib/aws-sdk-core/endpoints/rule.rb
aws-sdk-core-3.168.0 lib/aws-sdk-core/endpoints/rule.rb
aws-sdk-core-3.167.0 lib/aws-sdk-core/endpoints/rule.rb
aws-sdk-core-3.166.0 lib/aws-sdk-core/endpoints/rule.rb
aws-sdk-core-3.165.1 lib/aws-sdk-core/endpoints/rule.rb
aws-sdk-core-3.165.0 lib/aws-sdk-core/endpoints/rule.rb