Class: Gem::Resolver::ComposedSet
Relationships & Source Files | |
Extension / Inclusion / Inheritance Descendants | |
Subclasses:
|
|
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
Set
|
|
Instance Chain:
self,
Set
|
|
Inherits: |
Gem::Resolver::Set
|
Defined in: | lib/rubygems/resolver/composed_set.rb |
Overview
A ComposedSet allows multiple sets to be queried like a single set.
To create a composed set with any number of sets use:
Gem::Resolver.compose_sets set1, set2
This method will eliminate nesting of composed sets.
Class Method Summary
-
.new(*sets) ⇒ ComposedSet
constructor
Creates a new
ComposedSet
containing #sets.
Set
- Inherited
Instance Attribute Summary
-
#prerelease=(allow_prerelease)
writeonly
When
allow_prerelease
is set totrue
prereleases gems are allowed to match dependencies. -
#remote=(remote)
writeonly
Sets the remote network access for all composed sets.
- #sets readonly Internal use only
Set
- Inherited
#errors | Errors encountered when resolving gems. |
#prerelease | When true, allows matching of requests to prerelease gems. |
#remote |
|
#remote? | When true, this set is allowed to access the network when looking up specifications or dependencies. |
Instance Method Summary
- #errors
-
#find_all(req)
Finds all specs matching
req
in all sets. -
#prefetch(reqs)
Prefetches
reqs
in all sets.
Set
- Inherited
Constructor Details
.new(*sets) ⇒ ComposedSet
Creates a new ComposedSet
containing #sets. Use Gem::Resolver.compose_sets instead.
Instance Attribute Details
#prerelease=(allow_prerelease) (writeonly)
When allow_prerelease
is set to true
prereleases gems are allowed to match dependencies.
# File 'lib/rubygems/resolver/composed_set.rb', line 29
def prerelease=(allow_prerelease) super sets.each do |set| set.prerelease = allow_prerelease end end
#remote=(remote) (writeonly)
Sets the remote network access for all composed sets.
# File 'lib/rubygems/resolver/composed_set.rb', line 40
def remote=(remote) super @sets.each { |set| set.remote = remote } end
#sets (readonly)
# File 'lib/rubygems/resolver/composed_set.rb', line 13
attr_reader :sets # :nodoc:
Instance Method Details
#errors
[ GitHub ]# File 'lib/rubygems/resolver/composed_set.rb', line 46
def errors @errors + @sets.map { |set| set.errors }.flatten end
#find_all(req)
Finds all specs matching req
in all sets.
# File 'lib/rubygems/resolver/composed_set.rb', line 53
def find_all(req) @sets.map do |s| s.find_all req end.flatten end
#prefetch(reqs)
Prefetches reqs
in all sets.
# File 'lib/rubygems/resolver/composed_set.rb', line 62
def prefetch(reqs) @sets.each { |s| s.prefetch(reqs) } end