Method: Pod::Source#pods_for_specification_paths

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

#pods_for_specification_paths(spec_paths) ⇒ Array<String>

Returns pod names for given array of specification paths.

Parameters:

  • spec_paths (Array<String>)

    Array of file path names for specifications. Path strings should be relative to the source path.

Returns:

  • (Array<String>)

    the list of the name of Pods corresponding to specification paths.

[View source]

149
150
151
152
153
154
155
156
# File 'lib/cocoapods-core/source.rb', line 149

def pods_for_specification_paths(spec_paths)
  spec_paths.map do |path|
    absolute_path = repo + path
    relative_path = absolute_path.relative_path_from(specs_dir)
    # The first file name returned by 'each_filename' is the pod name
    relative_path.each_filename.first
  end
end