Method: Pod::Podfile#get_hash_value

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

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

Returns the value for the given key in the internal hash of the Podfile.

Parameters:

  • The key for which the value is needed.

  • (defaults to: nil)

    The default value to return if the internal hash has no entry for the given key.

Returns:

  • The value for the key.

Raises:

  • If the key is not recognized.



422
423
424
425
426
427
# File 'lib/cocoapods-core/podfile.rb', line 422

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