lib/cocoapods/bazel/util.rb
# Recursively resolves the variables in string with the given resolved values.
#
# Example: Given string = "${PODS_ROOT}/Foo", resolved_values = {"PODS_ROOT": "//Pods"}
# this function returns "//Pods/Foo".
Recursively resolves the variables in string with the given resolved values.
Recursively resolves the variables in string with the given resolved values .
def resolve_value(string, resolved_values:)
        return string unless string =~ /\$(?:\{([_a-zA-Z0-0]+?)\}|\(([_a-zA-Z0-0]+?)\))/
        match, key = Regexp.last_match.values_at(0, 1, 2).compact
        sub = resolved_values.fetch(key, '')
        resolve_value(string.gsub(match, sub), resolved_values: resolved_values)
      end
def resolve_value ( string , resolved_values : ) return string unless string =~ / \$ (?: \{ ([_a-zA-Z0-0]+?) \} | \( ([_a-zA-Z0-0]+?) \) ) / match , key = Regexp . last_match . values_at ( 0 , 1 , 2 ) . compact sub = resolved_values . fetch ( key , '' ) resolve_value ( string . gsub ( match , sub ) , resolved_values : resolved_values ) end
Recursively resolves the variables in string with the given resolved values.
Recursively resolves the variables in string with the given resolved values .
string
<not_specific>
resolved_values
<not_specific>