Class: Pod::Installer::Xcode::ProjectGenerator
- Inherits:
-
Object
- Object
- Pod::Installer::Xcode::ProjectGenerator
- Defined in:
- lib/cocoapods/installer/xcode/pods_project_generator/project_generator.rb
Overview
Responsible for creating and preparing a Pod::Project instance
Instance Attribute Summary collapse
-
#build_configurations ⇒ Hash{String=>Symbol}
readonly
A hash representing all the user build configurations across all integration targets.
-
#object_version ⇒ Integer
readonly
Object version for the Xcode project.
-
#path ⇒ String
readonly
Path Path of the project.
-
#platforms ⇒ Array<Platform>
readonly
The list of all platforms this project supports.
-
#pod_target_subproject ⇒ Boolean
readonly
Used by ‘generate_multiple_pod_projects` installation option.
-
#pod_targets ⇒ Array<PodTarget>
readonly
Pod_targets Array of pod targets this project includes.
-
#podfile_path ⇒ String
readonly
Path to the Podfile included in the project.
-
#sandbox ⇒ Sandbox
readonly
Sandbox The Pods sandbox instance.
Instance Method Summary collapse
-
#generate! ⇒ Project
Generated and prepared project.
-
#initialize(sandbox, path, pod_targets, build_configurations, platforms, object_version, podfile_path = nil, pod_target_subproject: false) ⇒ ProjectGenerator
constructor
Initialize a new instance.
Constructor Details
#initialize(sandbox, path, pod_targets, build_configurations, platforms, object_version, podfile_path = nil, pod_target_subproject: false) ⇒ ProjectGenerator
Initialize a new instance
56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/cocoapods/installer/xcode/pods_project_generator/project_generator.rb', line 56 def initialize(sandbox, path, pod_targets, build_configurations, platforms, object_version, podfile_path = nil, pod_target_subproject: false) @sandbox = sandbox @path = path @pod_targets = pod_targets @build_configurations = build_configurations @platforms = platforms @object_version = object_version @podfile_path = podfile_path @pod_target_subproject = pod_target_subproject end |
Instance Attribute Details
#build_configurations ⇒ Hash{String=>Symbol} (readonly)
Returns A hash representing all the user build configurations across all integration targets. Each key corresponds to the name of a configuration and its value to its type (‘:debug` or `:release`).
27 28 29 |
# File 'lib/cocoapods/installer/xcode/pods_project_generator/project_generator.rb', line 27 def build_configurations @build_configurations end |
#object_version ⇒ Integer (readonly)
Returns Object version for the Xcode project.
35 36 37 |
# File 'lib/cocoapods/installer/xcode/pods_project_generator/project_generator.rb', line 35 def object_version @object_version end |
#path ⇒ String (readonly)
Returns path Path of the project.
15 16 17 |
# File 'lib/cocoapods/installer/xcode/pods_project_generator/project_generator.rb', line 15 def path @path end |
#platforms ⇒ Array<Platform> (readonly)
Returns The list of all platforms this project supports.
31 32 33 |
# File 'lib/cocoapods/installer/xcode/pods_project_generator/project_generator.rb', line 31 def platforms @platforms end |
#pod_target_subproject ⇒ Boolean (readonly)
Used by ‘generate_multiple_pod_projects` installation option.
44 45 46 |
# File 'lib/cocoapods/installer/xcode/pods_project_generator/project_generator.rb', line 44 def pod_target_subproject @pod_target_subproject end |
#pod_targets ⇒ Array<PodTarget> (readonly)
Returns pod_targets Array of pod targets this project includes.
20 21 22 |
# File 'lib/cocoapods/installer/xcode/pods_project_generator/project_generator.rb', line 20 def pod_targets @pod_targets end |
#podfile_path ⇒ String (readonly)
Returns Path to the Podfile included in the project.
39 40 41 |
# File 'lib/cocoapods/installer/xcode/pods_project_generator/project_generator.rb', line 39 def podfile_path @podfile_path end |
#sandbox ⇒ Sandbox (readonly)
Returns sandbox The Pods sandbox instance.
10 11 12 |
# File 'lib/cocoapods/installer/xcode/pods_project_generator/project_generator.rb', line 10 def sandbox @sandbox end |
Instance Method Details
#generate! ⇒ Project
Returns Generated and prepared project.
72 73 74 75 76 |
# File 'lib/cocoapods/installer/xcode/pods_project_generator/project_generator.rb', line 72 def generate! project = create_project(path, object_version, pod_target_subproject) prepare(sandbox, project, pod_targets, build_configurations, platforms, podfile_path) project end |