Class: Pod::Installer::Xcode::PodsProjectGenerator::PodsProjectGeneratorResult

Inherits:
Object
  • Object
show all
Defined in:
lib/cocoapods/installer/xcode/pods_project_generator_result.rb

Overview

A simple container produced after a pod project generation is completed.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(project, projects_by_pod_targets, target_installation_results) ⇒ PodsProjectGeneratorResult

Initialize a new instance

Parameters:

  • project (Project)

    @see #project

  • projects_by_pod_targets (Hash{Project => Array<PodTargets>})

    @see #projects_by_pod_targets

  • target_installation_results (InstallationResults)

    @see #target_installation_results



26
27
28
29
30
# File 'lib/cocoapods/installer/xcode/pods_project_generator_result.rb', line 26

def initialize(project, projects_by_pod_targets, target_installation_results)
  @project = project
  @projects_by_pod_targets = projects_by_pod_targets
  @target_installation_results = target_installation_results
end

Instance Attribute Details

#projectProject (readonly)

Returns project.

Returns:



10
11
12
# File 'lib/cocoapods/installer/xcode/pods_project_generator_result.rb', line 10

def project
  @project
end

#projects_by_pod_targetsHash{Project => Array<PodTargets>} (readonly)

Returns Project by pod targets map.

Returns:

  • (Hash{Project => Array<PodTargets>})

    Project by pod targets map



14
15
16
# File 'lib/cocoapods/installer/xcode/pods_project_generator_result.rb', line 14

def projects_by_pod_targets
  @projects_by_pod_targets
end

#target_installation_resultsInstallationResults (readonly)

Returns target installation results.

Returns:



18
19
20
# File 'lib/cocoapods/installer/xcode/pods_project_generator_result.rb', line 18

def target_installation_results
  @target_installation_results
end

Instance Method Details

#native_target_for_spec(spec) ⇒ Xcodeproj::PBXNativeTarget

Returns the native target for the spec.

Parameters:

Returns:

  • (Xcodeproj::PBXNativeTarget)

    the native target for the spec



37
38
39
# File 'lib/cocoapods/installer/xcode/pods_project_generator_result.rb', line 37

def native_target_for_spec(spec)
  installation_results_by_spec[spec.root].native_target_for_spec(spec)
end