Method: Pod::Specification::Consumer#raw_value_for_attribute

Defined in:
lib/cocoapods-core/specification/consumer.rb

#raw_value_for_attribute(the_spec, attr) ⇒ String, ...

Returns the value of a given attribute taking into account multi platform values.

Parameters:

  • the specification for which the value is needed.

  • the attribute for which that value is needed.

Returns:

  • The value for an attribute.



289
290
291
292
293
294
295
296
297
298
299
300
301
# File 'lib/cocoapods-core/specification/consumer.rb', line 289

def raw_value_for_attribute(the_spec, attr)
  value = the_spec.attributes_hash[attr.name.to_s]
  value = prepare_value(attr, value)

  if attr.multi_platform?
    if platform_hash = the_spec.attributes_hash[platform_name.to_s]
      platform_value = platform_hash[attr.name.to_s]
      platform_value = prepare_value(attr, platform_value)
      value = merge_values(attr, value, platform_value)
    end
  end
  value
end