123456789_123456789_123456789_123456789_123456789_

Class: Bundler::PubGrub::Assignment

Relationships & Source Files
Inherits: Object
Defined in: lib/bundler/vendor/pub_grub/lib/pub_grub/assignment.rb

Class Method Summary

Instance Attribute Summary

Constructor Details

.new(term, cause, decision_level, index) ⇒ Assignment

[ GitHub ]

  
# File 'lib/bundler/vendor/pub_grub/lib/pub_grub/assignment.rb', line 4

def initialize(term, cause, decision_level, index)
  @term = term
  @cause = cause
  @decision_level = decision_level
  @index = index
end

Class Method Details

.decision(package, version, decision_level, index)

[ GitHub ]

  
# File 'lib/bundler/vendor/pub_grub/lib/pub_grub/assignment.rb', line 11

def self.decision(package, version, decision_level, index)
  term = Term.new(VersionConstraint.exact(package, version), true)
  new(term, :decision, decision_level, index)
end

Instance Attribute Details

#cause (readonly)

[ GitHub ]

  
# File 'lib/bundler/vendor/pub_grub/lib/pub_grub/assignment.rb', line 3

attr_reader :term, :cause, :decision_level, :index

#decision?Boolean (readonly)

[ GitHub ]

  
# File 'lib/bundler/vendor/pub_grub/lib/pub_grub/assignment.rb', line 16

def decision?
  cause == :decision
end

#decision_level (readonly)

[ GitHub ]

  
# File 'lib/bundler/vendor/pub_grub/lib/pub_grub/assignment.rb', line 3

attr_reader :term, :cause, :decision_level, :index

#index (readonly)

[ GitHub ]

  
# File 'lib/bundler/vendor/pub_grub/lib/pub_grub/assignment.rb', line 3

attr_reader :term, :cause, :decision_level, :index

#term (readonly)

[ GitHub ]

  
# File 'lib/bundler/vendor/pub_grub/lib/pub_grub/assignment.rb', line 3

attr_reader :term, :cause, :decision_level, :index