Method: Pod::Podfile::TargetDefinition#get_hash_value

Defined in:
lib/cocoapods-core/podfile/target_definition.rb

#get_hash_value(key, base_value = nil) ⇒ Object (private)

Returns the value for the given key in the internal hash of the target definition.

Parameters:

  • key (String)

    The key for which the value is needed.

  • base_value (Object) (defaults to: nil)

    The value to set if they key is nil. Useful for collections.

Returns:

  • (Object)

    The value for the key.

Raises:



906
907
908
909
910
911
912
# File 'lib/cocoapods-core/podfile/target_definition.rb', line 906

def get_hash_value(key, base_value = nil)
  unless HASH_KEYS.include?(key)
    raise StandardError, "Unsupported hash key `#{key}`"
  end
  internal_hash[key] = base_value if internal_hash[key].nil?
  internal_hash[key]
end