Sha256: bc696a464787d704c45427cd8281b9805305d36a287329e4924b8f3b47b3188d
Contents?: true
Size: 782 Bytes
Versions: 7
Compression:
Stored size: 782 Bytes
Contents
module Solve class Solver class VariableRow attr_reader :artifact attr_reader :value attr_reader :sources # @param [String] artifact # @param [String, Symbol] source def initialize(artifact, source) @artifact = artifact @value = nil @sources = Array(source) end # @param [String, Symbol] source def add_source(source) @sources << source end def last_source @sources.last end def bind(value) @value = value end def unbind @value = nil end def bound? !@value.nil? end # @param [String, Symbol] source def remove_source(source) @sources.delete(source) end end end end
Version data entries
7 entries across 7 versions & 1 rubygems