class Pod::Installer::Analyzer::PodVariant
Bundles the information needed to setup a {PodTarget}.
Attributes
Hashes the instance by all its attributes.
This adds support to make instances usable as Hash keys.
@!visibility private
@return [Platform] the platform
@return [Bool] whether this pod should be built as framework
@return [Bool] whether this pod should be built as framework
@return [Array<Specification>] the spec and subspecs for the target
@return [Array<Specification>] the test specs for the target
Public Class Methods
Initialize a new instance from its attributes.
@param [Array<Specification>] specs @see specs
@param [Array<Specification>] test_specs
@see test_specs
@param [Platform] platform @see platform
@param [Bool] requires_frameworks
@see requires_frameworks?
# 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
Public Instance Methods
@note 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.
@return [Bool] whether the {PodVariant} is equal to another taking all
all their attributes into account
# 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
@return [Specification] the root specification
# File lib/cocoapods/installer/analyzer/pod_variant.rb, line 25 def root_spec specs.first.root end