Class: Pod::Installer::PostInstallHooksContext
- Inherits:
-
Object
- Object
- Pod::Installer::PostInstallHooksContext
- Defined in:
- lib/cocoapods/installer/post_install_hooks_context.rb
Overview
Context object designed to be used with the HooksManager which describes the context of the installer.
Defined Under Namespace
Classes: UmbrellaTargetDescription
Instance Attribute Summary collapse
-
#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
-
#initialize(sandbox, sandbox_root, pods_project, umbrella_targets) ⇒ PostInstallHooksContext
constructor
Initialize a new instance.
Constructor Details
#initialize(sandbox, sandbox_root, pods_project, umbrella_targets) ⇒ PostInstallHooksContext
Initialize a new instance
31 32 33 34 35 36 |
# File 'lib/cocoapods/installer/post_install_hooks_context.rb', line 31 def initialize(sandbox, sandbox_root, pods_project, umbrella_targets) @sandbox = sandbox @sandbox_root = sandbox_root @pods_project = pods_project @umbrella_targets = umbrella_targets end |
Instance Attribute Details
#pods_project ⇒ Xcodeproj::Project (readonly)
Returns The Pods Xcode project.
17 18 19 |
# File 'lib/cocoapods/installer/post_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/post_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/post_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.
22 23 24 |
# File 'lib/cocoapods/installer/post_install_hooks_context.rb', line 22 def umbrella_targets @umbrella_targets end |
Class Method Details
.generate(sandbox, aggregate_targets) ⇒ PostInstallHooksContext, HooksContext
50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/cocoapods/installer/post_install_hooks_context.rb', line 50 def self.generate(sandbox, 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, sandbox.project, umbrella_targets_descriptions) end |