Sha256: e076a30eebd8f2649f154cfbe086c585bfbe3eb6c64a4f6cc5eae6d15403c76d

Contents?: true

Size: 489 Bytes

Versions: 2

Compression:

Stored size: 489 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(version, decision_level, index)
      term = Term.new(VersionConstraint.exact(version), true)
      new(term, :decision, decision_level, index)
    end

    def decision?
      cause == :decision
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
pub_grub-0.2.0 lib/pub_grub/assignment.rb
pub_grub-0.1.0 lib/pub_grub/assignment.rb