Class: Pod::Specification::Set::External

Inherits:
Pod::Specification::Set show all
Defined in:
lib/cocoapods-core/specification/set.rb

Overview

Note:

External sources *don’t* support subspecs.

The Set::External class handles Pods from external sources. Pods from external sources don’t use the Pod::Source and are initialized by a given specification.

Instance Attribute Summary collapse

Attributes inherited from Pod::Specification::Set

#name, #sources

Instance Method Summary collapse

Methods inherited from Pod::Specification::Set

#dependency, #highest_version, #highest_version_spec_path, #required_version, #specification_path_for_version, #to_hash, #to_s, #versions_by_source

Constructor Details

#initialize(spec) ⇒ External

Returns a new instance of External.



188
189
190
191
# File 'lib/cocoapods-core/specification/set.rb', line 188

def initialize(spec)
  @specification = spec.root
  super(@specification.name)
end

Instance Attribute Details

#specificationObject (readonly)

Returns the value of attribute specification.



186
187
188
# File 'lib/cocoapods-core/specification/set.rb', line 186

def specification
  @specification
end

Instance Method Details

#==(other) ⇒ Object



193
194
195
# File 'lib/cocoapods-core/specification/set.rb', line 193

def ==(other)
  self.class === other && @specification == other.specification
end

#required_by(dependency, dependent_name) ⇒ Object



197
198
199
200
201
202
# File 'lib/cocoapods-core/specification/set.rb', line 197

def required_by(dependency, dependent_name)
  before = @specification
  super(dependency, dependent_name)
ensure
  @specification = before
end

#specification_pathObject

Raises:



204
205
206
# File 'lib/cocoapods-core/specification/set.rb', line 204

def specification_path
  raise StandardError, "specification_path"
end

#versionsObject



208
209
210
# File 'lib/cocoapods-core/specification/set.rb', line 208

def versions
  [@specification.version]
end