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.
328 329 330 331 |
# File 'lib/rubygems/dependency_resolver.rb', line 328 def initialize(dep, act) @dependency = dep @requester = act end |
Instance Attribute Details
#dependency ⇒ Object (readonly)
Returns the value of attribute dependency.
333 334 335 |
# File 'lib/rubygems/dependency_resolver.rb', line 333 def dependency @dependency end |
#requester ⇒ Object (readonly)
Returns the value of attribute requester.
333 334 335 |
# File 'lib/rubygems/dependency_resolver.rb', line 333 def requester @requester end |
Instance Method Details
#==(other) ⇒ Object
347 348 349 350 351 352 353 354 355 356 |
# File 'lib/rubygems/dependency_resolver.rb', line 347 def ==(other) case other when Dependency @dependency == other when DependencyRequest @dependency == other.dependency && @requester == other.requester else false end end |
#matches_spec?(spec) ⇒ Boolean
339 340 341 |
# File 'lib/rubygems/dependency_resolver.rb', line 339 def matches_spec?(spec) @dependency.matches_spec? spec end |
#name ⇒ Object
335 336 337 |
# File 'lib/rubygems/dependency_resolver.rb', line 335 def name @dependency.name end |
#to_s ⇒ Object
343 344 345 |
# File 'lib/rubygems/dependency_resolver.rb', line 343 def to_s @dependency.to_s end |