Class: Pod::Installer::SourceProviderHooksContext
- Inherits:
-
Object
- Object
- Pod::Installer::SourceProviderHooksContext
- 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
-
#sources ⇒ Array<Source>
readonly
The source objects to send to the installer.
Class Method Summary collapse
-
.generate ⇒ SourceProviderHooksContext
Convenience class method to generate the static context.
Instance Method Summary collapse
- #add_source(source) ⇒ void
-
#initialize ⇒ SourceProviderHooksContext
constructor
A new instance of SourceProviderHooksContext.
Constructor Details
#initialize ⇒ SourceProviderHooksContext
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
#sources ⇒ Array<Source> (readonly)
Returns 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
.generate ⇒ SourceProviderHooksContext
Returns Convenience class method to generate the static context.
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) ⇒ void
This method returns an undefined value.
27 28 29 30 31 |
# File 'lib/cocoapods/installer/source_provider_hooks_context.rb', line 27 def add_source(source) unless source.nil? @sources << source end end |