Class: Pod::Installer::Xcode::PodsProjectGenerator::PodTargetIntegrator
- Inherits:
-
Object
- Object
- Pod::Installer::Xcode::PodsProjectGenerator::PodTargetIntegrator
- Defined in:
- lib/cocoapods/installer/xcode/pods_project_generator/pod_target_integrator.rb
Overview
This class is responsible for integrating a pod target. This includes integrating the test targets included by each pod target.
Instance Attribute Summary collapse
-
#target_installation_result ⇒ TargetInstallationResult
readonly
The installation result of the target that should be integrated.
Instance Method Summary collapse
-
#initialize(target_installation_result) ⇒ PodTargetIntegrator
constructor
Initialize a new instance.
-
#inspect ⇒ String
A string representation suitable for debugging.
-
#integrate! ⇒ void
Integrates the pod target.
Constructor Details
#initialize(target_installation_result) ⇒ PodTargetIntegrator
Initialize a new instance
17 18 19 |
# File 'lib/cocoapods/installer/xcode/pods_project_generator/pod_target_integrator.rb', line 17 def initialize(target_installation_result) @target_installation_result = target_installation_result end |
Instance Attribute Details
#target_installation_result ⇒ TargetInstallationResult (readonly)
Returns the installation result of the target that should be integrated.
11 12 13 |
# File 'lib/cocoapods/installer/xcode/pods_project_generator/pod_target_integrator.rb', line 11 def target_installation_result @target_installation_result end |
Instance Method Details
#inspect ⇒ String
Returns a string representation suitable for debugging.
39 40 41 |
# File 'lib/cocoapods/installer/xcode/pods_project_generator/pod_target_integrator.rb', line 39 def inspect "#<#{self.class} for target `#{target.label}'>" end |
#integrate! ⇒ void
This method returns an undefined value.
Integrates the pod target.
25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/cocoapods/installer/xcode/pods_project_generator/pod_target_integrator.rb', line 25 def integrate! UI.section() do target_installation_result.test_specs_by_native_target.each do |test_native_target, test_specs| (test_native_target) add_copy_resources_script_phase(test_native_target) UserProjectIntegrator::TargetIntegrator.create_or_update_user_script_phases(script_phases_for_specs(test_specs), test_native_target) end specs = target.non_test_specs UserProjectIntegrator::TargetIntegrator.create_or_update_user_script_phases(script_phases_for_specs(specs), target_installation_result.native_target) end end |