Class: Pod::Resolver::ResolverSpecification

Inherits:
Object
  • Object
show all
Defined in:
lib/cocoapods/resolver/resolver_specification.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_non_library_targets_only, source) ⇒ ResolverSpecification

Returns a new instance of ResolverSpecification.



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

def initialize(spec, used_by_non_library_targets_only, source)
  @spec = spec
  @used_by_non_library_targets_only = used_by_non_library_targets_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



13
14
15
# File 'lib/cocoapods/resolver/resolver_specification.rb', line 13

def source
  @source
end

#specSpecification (readonly)

Returns the specification that was resolved.

Returns:



9
10
11
# File 'lib/cocoapods/resolver/resolver_specification.rb', line 9

def spec
  @spec
end

#used_by_non_library_targets_onlyBoolean (readonly) Also known as: used_by_non_library_targets_only?

Returns whether this resolved specification is used by non-library targets.

Returns:

  • (Boolean)

    whether this resolved specification is used by non-library targets.



17
18
19
# File 'lib/cocoapods/resolver/resolver_specification.rb', line 17

def used_by_non_library_targets_only
  @used_by_non_library_targets_only
end

Instance Method Details

#==(other) ⇒ Object



34
35
36
37
38
# File 'lib/cocoapods/resolver/resolver_specification.rb', line 34

def ==(other)
  self.class == other.class &&
      spec == other.spec &&
      used_by_non_library_targets_only? == other.used_by_non_library_targets_only?
end

#nameObject



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

def name
  spec.name
end

#rootObject



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

def root
  spec.root
end