Class: Pod::Installer::PreInstallHooksContext
- Inherits:
-
Object
- Object
- Pod::Installer::PreInstallHooksContext
- Defined in:
- lib/cocoapods/installer/pre_install_hooks_context.rb
Overview
Context object designed to be used with the HooksManager which describes the context of the installer before analysis has been completed.
Instance Attribute Summary collapse
-
#lockfile ⇒ Lockfile
readonly
The Lockfile for the project.
-
#podfile ⇒ Podfile
readonly
The Podfile for the project.
-
#sandbox ⇒ Sandbox
readonly
The Sandbox for the project.
-
#sandbox_root ⇒ String
readonly
The path to the sandbox root (‘Pods` directory).
Class Method Summary collapse
-
.generate(sandbox, podfile, lockfile) ⇒ PreInstallHooksContext
Convenience class method to generate the static context.
Instance Method Summary collapse
-
#initialize(podfile, sandbox, sandbox_root, lockfile) ⇒ PreInstallHooksContext
constructor
Initialize a new instance.
Constructor Details
#initialize(podfile, sandbox, sandbox_root, lockfile) ⇒ PreInstallHooksContext
Initialize a new instance
30 31 32 33 34 35 |
# File 'lib/cocoapods/installer/pre_install_hooks_context.rb', line 30 def initialize(podfile, sandbox, sandbox_root, lockfile) @podfile = podfile @sandbox = sandbox @sandbox_root = sandbox_root @lockfile = lockfile end |
Instance Attribute Details
#lockfile ⇒ Lockfile (readonly)
Returns The Lockfile for the project.
21 22 23 |
# File 'lib/cocoapods/installer/pre_install_hooks_context.rb', line 21 def lockfile @lockfile end |
#podfile ⇒ Podfile (readonly)
Returns The Podfile for the project.
9 10 11 |
# File 'lib/cocoapods/installer/pre_install_hooks_context.rb', line 9 def podfile @podfile end |
#sandbox ⇒ Sandbox (readonly)
Returns The Sandbox for the project.
13 14 15 |
# File 'lib/cocoapods/installer/pre_install_hooks_context.rb', line 13 def sandbox @sandbox end |
#sandbox_root ⇒ String (readonly)
Returns The path to the sandbox root (‘Pods` directory).
17 18 19 |
# File 'lib/cocoapods/installer/pre_install_hooks_context.rb', line 17 def sandbox_root @sandbox_root end |
Class Method Details
.generate(sandbox, podfile, lockfile) ⇒ PreInstallHooksContext
Returns Convenience class method to generate the static context.
46 47 48 |
# File 'lib/cocoapods/installer/pre_install_hooks_context.rb', line 46 def self.generate(sandbox, podfile, lockfile) new(podfile, sandbox, sandbox.root.to_s, lockfile) end |