Class: Pod::Installer::Xcode::ProjectGenerator

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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_configurationsHash{String=>Symbol} (readonly)


27
28
29
# File 'lib/cocoapods/installer/xcode/pods_project_generator/project_generator.rb', line 27

def build_configurations
  @build_configurations
end

#object_versionString (readonly)


35
36
37
# File 'lib/cocoapods/installer/xcode/pods_project_generator/project_generator.rb', line 35

def object_version
  @object_version
end

#pathString (readonly)


15
16
17
# File 'lib/cocoapods/installer/xcode/pods_project_generator/project_generator.rb', line 15

def path
  @path
end

#platformsArray<Platform> (readonly)


31
32
33
# File 'lib/cocoapods/installer/xcode/pods_project_generator/project_generator.rb', line 31

def platforms
  @platforms
end

#pod_target_subprojectBool (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_targetsArray<PodTarget> (readonly)


20
21
22
# File 'lib/cocoapods/installer/xcode/pods_project_generator/project_generator.rb', line 20

def pod_targets
  @pod_targets
end

#podfile_pathString (readonly)


39
40
41
# File 'lib/cocoapods/installer/xcode/pods_project_generator/project_generator.rb', line 39

def podfile_path
  @podfile_path
end

#sandboxSandbox (readonly)


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


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