Class: Pod::Resolver::ResolverSpecification
- Inherits:
-
Object
- Object
- Pod::Resolver::ResolverSpecification
- 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
-
#source ⇒ Source
readonly
The spec repo source the specification came from.
-
#spec ⇒ Specification
readonly
The specification that was resolved.
-
#used_by_non_library_targets_only ⇒ Boolean
(also: #used_by_non_library_targets_only?)
readonly
Whether this resolved specification is used by non-library targets.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(spec, used_by_non_library_targets_only, source) ⇒ ResolverSpecification
constructor
A new instance of ResolverSpecification.
- #name ⇒ Object
- #root ⇒ Object
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
#source ⇒ Source (readonly)
Returns the spec repo source the specification came from.
13 14 15 |
# File 'lib/cocoapods/resolver/resolver_specification.rb', line 13 def source @source end |
#spec ⇒ Specification (readonly)
Returns the specification that was resolved.
9 10 11 |
# File 'lib/cocoapods/resolver/resolver_specification.rb', line 9 def spec @spec end |
#used_by_non_library_targets_only ⇒ Boolean (readonly) Also known as: used_by_non_library_targets_only?
Returns 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 |
#name ⇒ Object
26 27 28 |
# File 'lib/cocoapods/resolver/resolver_specification.rb', line 26 def name spec.name end |
#root ⇒ Object
30 31 32 |
# File 'lib/cocoapods/resolver/resolver_specification.rb', line 30 def root spec.root end |