Sha256: 92f79fd9a9898f08afd967da28c52ce4a830c780e87c8120cea4048872d58c73
Contents?: true
Size: 608 Bytes
Versions: 9
Compression:
Stored size: 608 Bytes
Contents
# frozen_string_literal: true module Aws module Endpoints # @api private class Reference def initialize(ref:) @ref = ref end attr_reader :ref def resolve(parameters, assigns) if parameters.class.singleton_class::PARAM_MAP.key?(@ref) member_name = parameters.class.singleton_class::PARAM_MAP[@ref] parameters[member_name] elsif assigns.key?(@ref) assigns[@ref] else raise ArgumentError, "Reference #{@ref} is not a param or an assigned value." end end end end end
Version data entries
9 entries across 9 versions & 1 rubygems