Sha256: dc49d2f92d0efddf3742c5ca5b21f14ef42f44c4cecd9cfac609d6bc90142edb

Contents?: true

Size: 507 Bytes

Versions: 12

Compression:

Stored size: 507 Bytes

Contents

module PubGrub
  class Assignment
    attr_reader :term, :cause, :decision_level, :index
    def initialize(term, cause, decision_level, index)
      @term = term
      @cause = cause
      @decision_level = decision_level
      @index = index
    end

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

    def decision?
      cause == :decision
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
pub_grub-0.5.0 lib/pub_grub/assignment.rb
pub_grub-0.5.0.alpha3 lib/pub_grub/assignment.rb
pub_grub-0.5.0.alpha2 lib/pub_grub/assignment.rb
pub_grub-0.5.0.alpha1 lib/pub_grub/assignment.rb
pub_grub-0.5.0.alpha lib/pub_grub/assignment.rb
pub_grub-0.4.3 lib/pub_grub/assignment.rb
pub_grub-0.4.2 lib/pub_grub/assignment.rb
pub_grub-0.4.1 lib/pub_grub/assignment.rb
pub_grub-0.4.0 lib/pub_grub/assignment.rb
pub_grub-0.3.2 lib/pub_grub/assignment.rb
pub_grub-0.3.1 lib/pub_grub/assignment.rb
pub_grub-0.3.0 lib/pub_grub/assignment.rb