Class: Pod::Installer::BaseInstallHooksContext
- Inherits:
-
Object
- Object
- Pod::Installer::BaseInstallHooksContext
- Defined in:
- lib/cocoapods/installer/base_install_hooks_context.rb
Overview
Context object designed to be used with the HooksManager which describes the context of the installer.
Direct Known Subclasses
PostInstallHooksContext, PostIntegrateHooksContext, PreIntegrateHooksContext
Defined Under Namespace
Classes: UmbrellaTargetDescription
Instance Attribute Summary collapse
-
#pod_target_subprojects ⇒ Array<Pod::Project>
readonly
The subprojects nested under pods_project.
-
#pods_project ⇒ Xcodeproj::Project
readonly
The Pods Xcode project.
-
#sandbox ⇒ Sandbox
readonly
The Sandbox for the project.
-
#sandbox_root ⇒ String
readonly
The path to the sandbox root (‘Pods` directory).
-
#umbrella_targets ⇒ Array<UmbrellaTargetDescription>
readonly
The list of the CocoaPods umbrella targets generated by the installer.
Class Method Summary collapse
Instance Method Summary collapse
-
#generated_projects ⇒ Array<Pod::Project>
All projects generated during installation.
-
#initialize(sandbox, sandbox_root, pods_project, pod_target_subprojects, umbrella_targets) ⇒ BaseInstallHooksContext
constructor
Initialize a new instance.
Constructor Details
#initialize(sandbox, sandbox_root, pods_project, pod_target_subprojects, umbrella_targets) ⇒ BaseInstallHooksContext
Initialize a new instance
36 37 38 39 40 41 42 |
# File 'lib/cocoapods/installer/base_install_hooks_context.rb', line 36 def initialize(sandbox, sandbox_root, pods_project, pod_target_subprojects, umbrella_targets) @sandbox = sandbox @sandbox_root = sandbox_root @pods_project = pods_project @pod_target_subprojects = pod_target_subprojects @umbrella_targets = umbrella_targets end |
Instance Attribute Details
#pod_target_subprojects ⇒ Array<Pod::Project> (readonly)
Returns the subprojects nested under pods_project.
21 22 23 |
# File 'lib/cocoapods/installer/base_install_hooks_context.rb', line 21 def pod_target_subprojects @pod_target_subprojects end |
#pods_project ⇒ Xcodeproj::Project (readonly)
Returns The Pods Xcode project.
17 18 19 |
# File 'lib/cocoapods/installer/base_install_hooks_context.rb', line 17 def pods_project @pods_project end |
#sandbox ⇒ Sandbox (readonly)
Returns The Sandbox for the project.
9 10 11 |
# File 'lib/cocoapods/installer/base_install_hooks_context.rb', line 9 def sandbox @sandbox end |
#sandbox_root ⇒ String (readonly)
Returns The path to the sandbox root (‘Pods` directory).
13 14 15 |
# File 'lib/cocoapods/installer/base_install_hooks_context.rb', line 13 def sandbox_root @sandbox_root end |
#umbrella_targets ⇒ Array<UmbrellaTargetDescription> (readonly)
Returns The list of the CocoaPods umbrella targets generated by the installer.
26 27 28 |
# File 'lib/cocoapods/installer/base_install_hooks_context.rb', line 26 def umbrella_targets @umbrella_targets end |
Class Method Details
.generate(sandbox, pods_project, pod_target_subprojects, aggregate_targets) ⇒ PostInstallHooksContext, HooksContext
62 63 64 65 66 67 68 69 70 71 72 73 74 |
# File 'lib/cocoapods/installer/base_install_hooks_context.rb', line 62 def self.generate(sandbox, pods_project, pod_target_subprojects, aggregate_targets) umbrella_targets_descriptions = aggregate_targets.map do |umbrella| user_project = umbrella.user_project user_targets = umbrella.user_targets specs = umbrella.specs platform_name = umbrella.platform.name platform_deployment_target = umbrella.platform.deployment_target.to_s cocoapods_target_label = umbrella.label UmbrellaTargetDescription.new(user_project, user_targets, specs, platform_name, platform_deployment_target, cocoapods_target_label) end new(sandbox, sandbox.root.to_s, pods_project, pod_target_subprojects, umbrella_targets_descriptions) end |
Instance Method Details
#generated_projects ⇒ Array<Pod::Project>
Returns all projects generated during installation.
78 79 80 |
# File 'lib/cocoapods/installer/base_install_hooks_context.rb', line 78 def generated_projects [pods_project] + pod_target_subprojects end |