>InstallerRepresentation

InstallerRepresentation

The installer representation to pass to the hooks.

Inherits from:

Object

Public Hooks API

sandbox_root

project

pods

libraries

specs_by_lib

pods_by_lib

Compatibility

target_installers

specs_by_target

local_pods_by_target

Unsafe Hooks API

sandbox

config

installer

Private implementation

initialize

sandbox_root

Signature

sandbox_root #=> Pathname 

Returns

Pathname The root of the sandbox.

Source

32 def sandbox_root
33   installer.sandbox.root
34 end

Source Files

lib/cocoapods/hooks/installer_representation.rb:32

spec/unit/hooks/installer_representation_spec.rb

project

Signature

project #=> Pod::Project 

Returns

Pod::Project The Pods/Pods.xcodeproj project.

Source

40 def project
41   installer.pods_project
42 end

Source Files

lib/cocoapods/hooks/installer_representation.rb:40

spec/unit/hooks/installer_representation_spec.rb

pods

Signature

pods #=> Array<PodRepresentation> 

Returns

Array The representation of the Pods.

Source

46 def pods
47   installer.pod_reps
48 end

Source Files

lib/cocoapods/hooks/installer_representation.rb:46

spec/unit/hooks/installer_representation_spec.rb

libraries

Signature

libraries #=> Array<LibraryRepresentation> 

Returns

Array

The representation of the libraries.

Aliases

Pod::Hooks::InstallerRepresentation#target_installers

Source

53 def libraries
54   installer.library_reps
55 end

Source Files

lib/cocoapods/hooks/installer_representation.rb:53

spec/unit/hooks/installer_representation_spec.rb

specs_by_lib

Signature

specs_by_lib #=> Hash{LibraryRepresentation => Array<Specification>} 

Returns

Hash{LibraryRepresentation => Array}

The specifications grouped by target definition.

Aliases

Pod::Hooks::InstallerRepresentation#specs_by_target

Source

60 def specs_by_lib
61   result = {}
62   installer.aggregate_targets.each do |aggregate_target|
63     result[installer.library_rep(aggregate_target)] = aggregate_target.specs
64   end
65   result
66 end

Source Files

lib/cocoapods/hooks/installer_representation.rb:60

spec/unit/hooks/installer_representation_spec.rb

pods_by_lib

Signature

pods_by_lib #=> Hash{LibraryRepresentation => Array<PodRepresentation>} 

Returns

Hash{LibraryRepresentation => Array}

The local pod instances grouped by target.

Aliases

Pod::Hooks::InstallerRepresentation#local_pods_by_target

Source

71 def pods_by_lib
72   result = {}
73   installer.aggregate_targets.map(&:pod_targets).flatten.each do |lib|
74     pod_names = [lib.root_spec.name]
75     pod_reps = pods.select { |rep| pod_names.include?(rep.name) }
76     result[lib.target_definition] = pod_reps
77   end
78   result
79 end

Source Files

lib/cocoapods/hooks/installer_representation.rb:71

spec/unit/hooks/installer_representation_spec.rb

target_installers

Signature

target_installers #=> Array<LibraryRepresentation> 

Returns

Array

The representation of the libraries.

Source

88 def libraries
89   installer.library_reps
90 end

Source Files

lib/cocoapods/hooks/installer_representation.rb:88

spec/unit/hooks/installer_representation_spec.rb

specs_by_target

Signature

specs_by_target #=> Hash{LibraryRepresentation => Array<Specification>} 

Returns

Hash{LibraryRepresentation => Array}

The specifications grouped by target definition.

Source

89 def specs_by_lib
90   result = {}
91   installer.aggregate_targets.each do |aggregate_target|
92     result[installer.library_rep(aggregate_target)] = aggregate_target.specs
93   end
94   result
95 end

Source Files

lib/cocoapods/hooks/installer_representation.rb:89

spec/unit/hooks/installer_representation_spec.rb

local_pods_by_target

Signature

local_pods_by_target #=> Hash{LibraryRepresentation => Array<PodRepresentation>} 

Returns

Hash{LibraryRepresentation => Array}

The local pod instances grouped by target.

Source

90 def pods_by_lib
91   result = {}
92   installer.aggregate_targets.map(&:pod_targets).flatten.each do |lib|
93     pod_names = [lib.root_spec.name]
94     pod_reps = pods.select { |rep| pod_names.include?(rep.name) }
95     result[lib.target_definition] = pod_reps
96   end
97   result
98 end

Source Files

lib/cocoapods/hooks/installer_representation.rb:90

spec/unit/hooks/installer_representation_spec.rb

sandbox

Signature

sandbox #=> Sandbox 

Returns

Sandbox

Sandbox the sandbox where the support files should be generated.

Source

104 def sandbox
105   installer.sandbox
106 end

Source Files

lib/cocoapods/hooks/installer_representation.rb:104

spec/unit/hooks/installer_representation_spec.rb

config

Signature

config #=> Config 

Returns

Config The config singleton used for the installation.

Source

110 def config
111   Config.instance
112 end

Source Files

lib/cocoapods/hooks/installer_representation.rb:110

spec/unit/hooks/installer_representation_spec.rb

installerattribute reader

Signature

installer #=> Installer 

Returns

Installer The installer described by this instance.

Source Files

lib/cocoapods/hooks/installer_representation.rb:116

spec/unit/hooks/installer_representation_spec.rb

initialize

Signature

initialize(installer) #=> InstallerRepresentation 

Parameters

Installer installer

@see installer

Returns

InstallerRepresentation A new instance of InstallerRepresentation

Source

124 def initialize(installer)
125   @installer = installer
126 end

Source Files

lib/cocoapods/hooks/installer_representation.rb:124

spec/unit/hooks/installer_representation_spec.rb