class Pod::DyInstaller::Analyzer::PodVariant

Bundles the information needed to setup a {PodTarget}.

Attributes

platform[R]

@return [Platform] the platform

requires_frameworks[R]

@return [Bool] whether this pod should be built as framework

requires_frameworks?[R]

@return [Bool] whether this pod should be built as framework

specs[R]

@return [Array<Specification>] the spec and subspecs for the target

test_specs[R]

@return [Array<Specification>] the test specs for the target

Public Class Methods

new(specs, test_specs, platform, requires_frameworks = false) click to toggle source

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/pod/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
end

Public Instance Methods

==(other) click to toggle source

@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/pod/installer/analyzer/pod_variant.rb, line 49
def ==(other)
  self.class == other.class &&
    specs == other.specs &&
    platform == other.platform &&
    requires_frameworks == other.requires_frameworks
end
Also aliased as: eql?
eql?(other)
Alias for: ==
hash() click to toggle source

Hashes the instance by all its attributes.

This adds support to make instances usable as Hash keys.

@!visibility private

# File lib/pod/installer/analyzer/pod_variant.rb, line 62
def hash
  [specs, platform, requires_frameworks].hash
end
root_spec() click to toggle source

@return [Specification] the root specification

# File lib/pod/installer/analyzer/pod_variant.rb, line 25
def root_spec
  specs.first.root
end