Class: Pod::Installer::SourceProviderHooksContext

Inherits:
Object
  • Object
show all
Defined in:
lib/cocoapods/installer/source_provider_hooks_context.rb

Overview

Context object designed to be used with the HooksManager which describes the context of the installer before spec sources have been created

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeSourceProviderHooksContext

Returns a new instance of SourceProviderHooksContext



19
20
21
# File 'lib/cocoapods/installer/source_provider_hooks_context.rb', line 19

def initialize
  @sources = []
end

Instance Attribute Details

#sourcesArray<Source> (readonly)

Returns The source objects to send to the installer

Returns:

  • (Array<Source>)

    The source objects to send to the installer



9
10
11
# File 'lib/cocoapods/installer/source_provider_hooks_context.rb', line 9

def sources
  @sources
end

Class Method Details

.generateSourceProviderHooksContext

Returns Convenience class method to generate the static context.

Returns:



14
15
16
17
# File 'lib/cocoapods/installer/source_provider_hooks_context.rb', line 14

def self.generate
  result = new
  result
end

Instance Method Details

#add_source(source) ⇒ Object

Parameters:

  • Source (Source)

    object to be added to the installer



25
26
27
28
29
# File 'lib/cocoapods/installer/source_provider_hooks_context.rb', line 25

def add_source(source)
  unless source.nil?
    @sources << source
  end
end