method
to_specs
v2_1_10 -
Show latest stable
- Class:
Gem::Dependency
to_specs()public
DOC: this method needs either documented or :nodoc’d
# File lib/rubygems/dependency.rb, line 278
def to_specs
matches = matching_specs true
# TODO: check Gem.activated_spec[self.name] in case matches falls outside
if matches.empty? then
specs = Gem::Specification.find_all { |s|
s.name == name
}.map { |x| x.full_name }
if specs.empty?
total = Gem::Specification.to_a.size
error = Gem::LoadError.new "Could not find '#{name}' (#{requirement}) among #{total} total gem(s)"
else
error = Gem::LoadError.new "Could not find '#{name}' (#{requirement}) - did find: [#{specs.join ','}]"
end
error.name = self.name
error.requirement = self.requirement
raise error
end
# TODO: any other resolver validations should go here
matches
end Related methods
- Instance methods
- <=>
- ==
- ===
- =~
- hash
- inspect
- latest_version?
- match?
- matches_spec?
- matching_specs
- merge
- prerelease?
- pretty_print
- requirement
- requirements_list
- specific?
- to_s
- to_spec
- to_specs
- type
- Class methods
- new