Used Internally. Wraps a Dependency object to also track which spec contained the Dependency.
Creates a new DependencyRequest for
dependency from requester. +requester may be nil
if the request came from a user.
# File rubygems/resolver/dependency_request.rb, line 21
def initialize dependency, requester
@dependency = dependency
@requester = requester
end
Is this dependency a development dependency?
# File rubygems/resolver/dependency_request.rb, line 40
def development?
@dependency.type == :development
end
Indicate that the request is for a gem explicitly requested by the user
# File rubygems/resolver/dependency_request.rb, line 73
def explicit?
@requester.nil?
end
Indicate that the request is for a gem requested as a dependency of another gem
# File rubygems/resolver/dependency_request.rb, line 81
def implicit?
!explicit?
end
Does this dependency request match spec?
NOTE: match? only matches prerelease versions when dependency is a prerelease dependency.
# File rubygems/resolver/dependency_request.rb, line 50
def match? spec, allow_prerelease = false
@dependency.match? spec, nil, allow_prerelease
end
Does this dependency request match spec?
NOTE: matches_spec? matches prerelease versions. See also match?
# File rubygems/resolver/dependency_request.rb, line 59
def matches_spec?(spec)
@dependency.matches_spec? spec
end
The name of the gem this dependency request is requesting.
# File rubygems/resolver/dependency_request.rb, line 66
def name
@dependency.name
end
Commenting is here to help enhance the documentation. For example, code samples, or clarification of the documentation.
If you have questions about Ruby or the documentation, please post to one of the Ruby mailing lists. You will get better, faster, help that way.
If you wish to post a correction of the docs, please do so, but also file bug report so that it can be corrected for the next release. Thank you.
If you want to help improve the Ruby documentation, please visit Documenting-ruby.org.