Class: Pod::Installer::PodSourcePreparer

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

Preparation collapse

Instance Method Summary collapse

Methods included from Executable

capture_command, capture_command!, executable, execute_command, which, which!

Constructor Details

#initialize(spec, path) ⇒ PodSourcePreparer

Initialize a new instance

Parameters:

  • spec (Specification)

    the root specification of the Pod.

  • path (Pathname)

    the folder where the source of the Pod is located.



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

#pathPathname (readonly)

Returns the folder where the source of the Pod is located.

Returns:

  • (Pathname)

    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

#specSpecification (readonly)

Returns the root specification of the Pod.

Returns:



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