Class: Gem::DependencyResolver::DependencyRequest
- Inherits:
-
Object
- Object
- Gem::DependencyResolver::DependencyRequest
- Defined in:
- lib/rubygems/dependency_resolver.rb
Overview
Used Internally. Wraps a Depedency object to also track which spec contained the Dependency.
Instance Attribute Summary collapse
-
#dependency ⇒ Object
readonly
Returns the value of attribute dependency.
-
#requester ⇒ Object
readonly
Returns the value of attribute requester.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(dep, act) ⇒ DependencyRequest
constructor
A new instance of DependencyRequest.
- #matches_spec?(spec) ⇒ Boolean
- #name ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(dep, act) ⇒ DependencyRequest
Returns a new instance of DependencyRequest.
317 318 319 320 |
# File 'lib/rubygems/dependency_resolver.rb', line 317 def initialize(dep, act) @dependency = dep @requester = act end |
Instance Attribute Details
#dependency ⇒ Object (readonly)
Returns the value of attribute dependency
322 323 324 |
# File 'lib/rubygems/dependency_resolver.rb', line 322 def dependency @dependency end |
#requester ⇒ Object (readonly)
Returns the value of attribute requester
322 323 324 |
# File 'lib/rubygems/dependency_resolver.rb', line 322 def requester @requester end |
Instance Method Details
#==(other) ⇒ Object
336 337 338 339 340 341 342 343 344 345 |
# File 'lib/rubygems/dependency_resolver.rb', line 336 def ==(other) case other when Dependency @dependency == other when DependencyRequest @dependency == other.dep && @requester == other.requester else false end end |
#matches_spec?(spec) ⇒ Boolean
328 329 330 |
# File 'lib/rubygems/dependency_resolver.rb', line 328 def matches_spec?(spec) @dependency.matches_spec? spec end |
#name ⇒ Object
324 325 326 |
# File 'lib/rubygems/dependency_resolver.rb', line 324 def name @dependency.name end |
#to_s ⇒ Object
332 333 334 |
# File 'lib/rubygems/dependency_resolver.rb', line 332 def to_s @dependency.to_s end |