Method: Pod::Podfile::TargetDefinition#parse_project_name

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

#parse_project_name(name, requirements) ⇒ void (private)

This method returns an undefined value.

Removes :project_name from the requirements list, and adds the pods name into internal hash.

Parameters:

  • name (String)

    The name of the pod

  • requirements (Array)

    If :project_name is the only key in the hash, the hash should be destroyed because it confuses Gem::Dependency.



1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
# File 'lib/cocoapods-core/podfile/target_definition.rb', line 1101

def parse_project_name(name, requirements)
  options = requirements.last
  return requirements unless options.is_a?(Hash)

  project_name = options.delete(:project_name)
  pod_name = Specification.root_name(name)
  raw_project_names_hash[pod_name] = project_name if project_name

  requirements.pop if options.empty?
end