Class: Pod::Installer::Analyzer::PodVariant
- Inherits:
-
Object
- Object
- Pod::Installer::Analyzer::PodVariant
- Defined in:
- lib/cocoapods/installer/analyzer/pod_variant.rb
Overview
Bundles the information needed to setup a PodTarget.
Instance Attribute Summary collapse
-
#platform ⇒ Platform
readonly
The platform.
-
#requires_frameworks ⇒ Bool
(also: #requires_frameworks?)
readonly
Whether this pod should be built as framework.
-
#specs ⇒ Array<Specification>
readonly
The spec and subspecs for the target.
-
#test_specs ⇒ Array<Specification>
readonly
The test specs for the target.
Instance Method Summary collapse
-
#==(other) ⇒ Bool
(also: #eql?)
Whether the PodVariant is equal to another taking all all their attributes into account.
-
#initialize(specs, test_specs, platform, requires_frameworks = false) ⇒ PodVariant
constructor
Initialize a new instance from its attributes.
-
#root_spec ⇒ Specification
The root specification.
Constructor Details
#initialize(specs, test_specs, platform, requires_frameworks = false) ⇒ PodVariant
Initialize a new instance from its attributes.
36 37 38 39 40 41 42 |
# File 'lib/cocoapods/installer/analyzer/pod_variant.rb', line 36 def initialize(specs, test_specs, platform, requires_frameworks = false) @specs = specs @test_specs = test_specs @platform = platform @requires_frameworks = requires_frameworks @hash = [specs, platform, requires_frameworks].hash end |
Instance Attribute Details
#platform ⇒ Platform (readonly)
Returns the platform.
16 17 18 |
# File 'lib/cocoapods/installer/analyzer/pod_variant.rb', line 16 def platform @platform end |
#requires_frameworks ⇒ Bool (readonly) Also known as: requires_frameworks?
Returns whether this pod should be built as framework.
20 21 22 |
# File 'lib/cocoapods/installer/analyzer/pod_variant.rb', line 20 def requires_frameworks @requires_frameworks end |
#specs ⇒ Array<Specification> (readonly)
Returns the spec and subspecs for the target.
8 9 10 |
# File 'lib/cocoapods/installer/analyzer/pod_variant.rb', line 8 def specs @specs end |
#test_specs ⇒ Array<Specification> (readonly)
Returns the test specs for the target.
12 13 14 |
# File 'lib/cocoapods/installer/analyzer/pod_variant.rb', line 12 def test_specs @test_specs end |
Instance Method Details
#==(other) ⇒ Bool Also known as: eql?
Test specs are intentionally not included as part of the equality for pod variants since a pod variant should not be affected by the number of test specs included.
Returns whether the Pod::Installer::Analyzer::PodVariant is equal to another taking all all their attributes into account.
50 51 52 53 54 55 |
# File 'lib/cocoapods/installer/analyzer/pod_variant.rb', line 50 def ==(other) self.class == other.class && requires_frameworks == other.requires_frameworks && platform == other.platform && specs == other.specs end |
#root_spec ⇒ Specification
Returns the root specification.
25 26 27 |
# File 'lib/cocoapods/installer/analyzer/pod_variant.rb', line 25 def root_spec specs.first.root end |