Method: Pod::Podfile::TargetDefinition#inheritance=

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

#inheritance=(inheritance) ⇒ void

This method returns an undefined value.

Sets the inheritance mode for this target definition.

Parameters:

  • inheritance (#to_s)

    the inheritance mode for this target definition.

Raises:

  • (Informative)

    if this target definition is a root target definition or if the inheritance value is unknown.



190
191
192
193
194
195
196
197
198
199
200
201
202
# File 'lib/cocoapods-core/podfile/target_definition.rb', line 190

def inheritance=(inheritance)
  inheritance = inheritance.to_s
  unless %w(none search_paths complete).include?(inheritance)
    raise Informative, "Unrecognized inheritance option `#{inheritance}` specified for target `#{name}`."
  end
  if root?
    raise Informative, 'Cannot set inheritance for the root target definition.'
  end
  if abstract?
    raise Informative, 'Cannot set inheritance for abstract target definition.'
  end
  set_hash_value('inheritance', inheritance)
end