Sha256: 3851ad051fea58d3d3e482dcc116a210e906782545ebc41a2887e37fc7d6e718

Contents?: true

Size: 680 Bytes

Versions: 3

Compression:

Stored size: 680 Bytes

Contents

module MiniKraken
  module Core
    # A record that a given vairable is associated with a value.
    class Association
      # @return [String] name of the variable beig association the value.
      attr_reader :var_name
      
      # @return [Term] the MiniKraken value associated with the variable
      attr_reader :value
      
      
      # @param aVariable [Variable, String] A variable or its name.
      # @param aValue [Term] value being associated to the variable.
      def initialize(aVariable, aValue)
        @var_name = aVariable.respond_to?(:name) ? aVariable.name : aVariable
        @value = aValue
      end
      
    end # class
  end # module
end # module

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
mini_kraken-0.1.04 lib/mini_kraken/core/association.rb
mini_kraken-0.1.03 lib/mini_kraken/core/association.rb
mini_kraken-0.1.02 lib/mini_kraken/core/association.rb