Methods
- #
- A
- E
- F
- I
- M
- N
- P
- R
- S
- T
Included Modules
Constants
Tuple | = | Struct.new(:spec, :source) |
Attributes
[R] | set |
Class Public methods
new() Link
Instance Public methods
<<(o) Link
# File ruby/lib/rubygems/available_set.rb, line 24 def <<(o) case o when Gem::AvailableSet s = o.set when Array s = o.map do |sp,so| if !sp.is_a?(Gem::Specification) || !so.is_a?(Gem::Source) raise TypeError, "Array must be in [[spec, source], ...] form" end Tuple.new(sp,so) end else raise TypeError, "must be a Gem::AvailableSet" end @set += s @sorted = nil self end
add(spec, source) Link
all_specs() Link
each() Link
Yields each Tuple
in this AvailableSet
each_spec() Link
Yields the Gem::Specification
for each Tuple
in this AvailableSet
empty?() Link
find_all(req) Link
Used by the Resolver, the protocol to use a AvailableSet
as a search Set
.
inject_into_list(dep_list) Link
match_platform!() Link
pick_best!() Link
prefetch(reqs) Link
remove_installed!(dep) Link
# File ruby/lib/rubygems/available_set.rb, line 149 def remove_installed!(dep) @set.reject! do |_t| # already locally installed Gem::Specification.any? do |installed_spec| dep.name == installed_spec.name && dep.requirement.satisfied_by?(installed_spec.version) end end @sorted = nil self end
size() Link
sorted() Link
source_for(spec) Link
to_request_set(development = :none) Link
Converts this AvailableSet
into a RequestSet that can be used to install gems.
If development
is :none then no development dependencies are installed. Other options are :shallow for only direct development dependencies of the gems in this set or :all for all development dependencies.
# File ruby/lib/rubygems/available_set.rb, line 106 def to_request_set(development = :none) request_set = Gem::RequestSet.new request_set.development = development == :all each_spec do |spec| request_set.always_install << spec request_set.gem spec.name, spec.version request_set.import spec.development_dependencies if development == :shallow end request_set end