Class: Pod::Resolver::ResolverSpecification

Inherits:
Object
  • Object
show all
Defined in:
lib/cocoapods/resolver.rb

Overview

A small container that wraps a resolved specification for a given target definition. Additional metadata is included here such as if the specification is only used by tests.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(spec, used_by_tests_only, source) ⇒ ResolverSpecification

Returns a new instance of ResolverSpecification.



32
33
34
35
36
# File 'lib/cocoapods/resolver.rb', line 32

def initialize(spec, used_by_tests_only, source)
  @spec = spec
  @used_by_tests_only = used_by_tests_only
  @source = source
end

Instance Attribute Details

#sourceSource (readonly)

Returns the spec repo source the specification came from.

Returns:

  • (Source)

    the spec repo source the specification came from



25
26
27
# File 'lib/cocoapods/resolver.rb', line 25

def source
  @source
end

#specSpecification (readonly)

Returns the specification that was resolved.

Returns:



21
22
23
# File 'lib/cocoapods/resolver.rb', line 21

def spec
  @spec
end

#used_by_tests_onlyBool (readonly) Also known as: used_by_tests_only?

Returns whether this resolved specification is only used by tests.

Returns:

  • (Bool)

    whether this resolved specification is only used by tests.



29
30
31
# File 'lib/cocoapods/resolver.rb', line 29

def used_by_tests_only
  @used_by_tests_only
end

Instance Method Details

#==(other) ⇒ Object



46
47
48
49
50
# File 'lib/cocoapods/resolver.rb', line 46

def ==(other)
  self.class == other &&
    spec == other.spec &&
    used_by_tests_only == other.test_only
end

#nameObject



38
39
40
# File 'lib/cocoapods/resolver.rb', line 38

def name
  spec.name
end

#rootObject



42
43
44
# File 'lib/cocoapods/resolver.rb', line 42

def root
  spec.root
end