Sha256: 93f0a44ceb8548713f1ebc0d1969105d593eef1a9eaf39218bc6d6605fde1bcc
Contents?: true
Size: 887 Bytes
Versions: 5
Compression:
Stored size: 887 Bytes
Contents
module Solve class Solver # @author Andrew Garson <andrew.garson@gmail.com> # @author Jamie Winsor <jamie@vialstudios.com> 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
5 entries across 5 versions & 1 rubygems