Class: Gem::DependencyResolver::DependencyRequest

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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

#dependencyObject (readonly)

Returns the value of attribute dependency



322
323
324
# File 'lib/rubygems/dependency_resolver.rb', line 322

def dependency
  @dependency
end

#requesterObject (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

Returns:

  • (Boolean)


328
329
330
# File 'lib/rubygems/dependency_resolver.rb', line 328

def matches_spec?(spec)
  @dependency.matches_spec? spec
end

#nameObject



324
325
326
# File 'lib/rubygems/dependency_resolver.rb', line 324

def name
  @dependency.name
end

#to_sObject



332
333
334
# File 'lib/rubygems/dependency_resolver.rb', line 332

def to_s
  @dependency.to_s
end