Class: Pod::Installer::PodSourcePreparer
- Inherits:
-
Object
- Object
- Pod::Installer::PodSourcePreparer
- Extended by:
- Executable
- Defined in:
- lib/cocoapods/installer/pod_source_preparer.rb
Overview
Controller class responsible of executing the prepare command of a single Pod.
Instance Attribute Summary collapse
-
#path ⇒ Pathname
readonly
The folder where the source of the Pod is located.
-
#spec ⇒ Specification
readonly
The root specification of the Pod.
Preparation collapse
-
#prepare! ⇒ void
Executes the prepare command if there is one.
Instance Method Summary collapse
-
#initialize(spec, path) ⇒ PodSourcePreparer
constructor
Initialize a new instance.
Methods included from Executable
capture_command, capture_command!, executable, execute_command, which, which!
Constructor Details
#initialize(spec, path) ⇒ PodSourcePreparer
Initialize a new instance
20 21 22 23 24 |
# File 'lib/cocoapods/installer/pod_source_preparer.rb', line 20 def initialize(spec, path) raise "Given spec isn't a root spec, but must be." unless spec.root? @spec = spec @path = path end |
Instance Attribute Details
#path ⇒ Pathname (readonly)
Returns the folder where the source of the Pod is located.
13 14 15 |
# File 'lib/cocoapods/installer/pod_source_preparer.rb', line 13 def path @path end |
#spec ⇒ Specification (readonly)
Returns the root specification of the Pod.
9 10 11 |
# File 'lib/cocoapods/installer/pod_source_preparer.rb', line 9 def spec @spec end |
Instance Method Details
#prepare! ⇒ void
This method returns an undefined value.
Executes the prepare command if there is one.
36 37 38 |
# File 'lib/cocoapods/installer/pod_source_preparer.rb', line 36 def prepare! run_prepare_command end |