Class: Bundler::PubGrub::Assignment
- Inherits:
-
Object
- Object
- Bundler::PubGrub::Assignment
- Defined in:
- lib/bundler/vendor/pub_grub/lib/pub_grub/assignment.rb
Instance Attribute Summary collapse
-
#cause ⇒ Object
readonly
Returns the value of attribute cause.
-
#decision_level ⇒ Object
readonly
Returns the value of attribute decision_level.
-
#index ⇒ Object
readonly
Returns the value of attribute index.
-
#term ⇒ Object
readonly
Returns the value of attribute term.
Class Method Summary collapse
Instance Method Summary collapse
- #decision? ⇒ Boolean
-
#initialize(term, cause, decision_level, index) ⇒ Assignment
constructor
A new instance of Assignment.
Constructor Details
#initialize(term, cause, decision_level, index) ⇒ Assignment
Returns a new instance of Assignment.
4 5 6 7 8 9 |
# 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 |
Instance Attribute Details
#cause ⇒ Object (readonly)
Returns the value of attribute cause.
3 4 5 |
# File 'lib/bundler/vendor/pub_grub/lib/pub_grub/assignment.rb', line 3 def cause @cause end |
#decision_level ⇒ Object (readonly)
Returns the value of attribute decision_level.
3 4 5 |
# File 'lib/bundler/vendor/pub_grub/lib/pub_grub/assignment.rb', line 3 def decision_level @decision_level end |
#index ⇒ Object (readonly)
Returns the value of attribute index.
3 4 5 |
# File 'lib/bundler/vendor/pub_grub/lib/pub_grub/assignment.rb', line 3 def index @index end |
#term ⇒ Object (readonly)
Returns the value of attribute term.
3 4 5 |
# File 'lib/bundler/vendor/pub_grub/lib/pub_grub/assignment.rb', line 3 def term @term end |
Class Method Details
.decision(package, version, decision_level, index) ⇒ Object
11 12 13 14 |
# 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 Method Details
#decision? ⇒ Boolean
16 17 18 |
# File 'lib/bundler/vendor/pub_grub/lib/pub_grub/assignment.rb', line 16 def decision? cause == :decision end |