Class: Pod::Installer::Analyzer::TargetInspector
- Inherits:
-
Object
- Object
- Pod::Installer::Analyzer::TargetInspector
- Defined in:
- lib/cocoapods/installer/analyzer/target_inspector.rb
Instance Attribute Summary collapse
-
#installation_root ⇒ Pathname
The root of the CocoaPods installation where the Podfile is located.
-
#target_definition ⇒ TargetDefinition
The target definition to inspect.
Instance Method Summary collapse
-
#compute_results ⇒ TargetInspectionResult
Inspect the #target_definition.
-
#initialize(target_definition, installation_root) ⇒ TargetInspector
constructor
Initialize a new instance.
Constructor Details
#initialize(target_definition, installation_root) ⇒ TargetInspector
Initialize a new instance
21 22 23 24 |
# File 'lib/cocoapods/installer/analyzer/target_inspector.rb', line 21 def initialize(target_definition, installation_root) @target_definition = target_definition @installation_root = installation_root end |
Instance Attribute Details
#installation_root ⇒ Pathname
Returns the root of the CocoaPods installation where the Podfile is located.
11 12 13 |
# File 'lib/cocoapods/installer/analyzer/target_inspector.rb', line 11 def installation_root @installation_root end |
#target_definition ⇒ TargetDefinition
Returns the target definition to inspect.
7 8 9 |
# File 'lib/cocoapods/installer/analyzer/target_inspector.rb', line 7 def target_definition @target_definition end |
Instance Method Details
#compute_results ⇒ TargetInspectionResult
Inspect the #target_definition
30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/cocoapods/installer/analyzer/target_inspector.rb', line 30 def compute_results project_path = compute_project_path user_project = Xcodeproj::Project.open(project_path) targets = compute_targets(user_project) result = TargetInspectionResult.new result.target_definition = target_definition result.project_path = project_path result.project_target_uuids = targets.map(&:uuid) result.build_configurations = compute_build_configurations(targets) result.platform = compute_platform(targets) result.archs = compute_archs(targets) result end |