class Variable

Attributes

scope[R]
type[R]
value[R]

Public Class Methods

new(val, type, scope) click to toggle source
# File lib/sdx/vm/variables.rb, line 5
def initialize(val, type, scope)
    @value = val
    @type = type
    @scope = scope
end

Public Instance Methods

set(val) click to toggle source
# File lib/sdx/vm/variables.rb, line 11
def set(val)
    if @mut == true 
        @value = val
    else
        puts "cant change value of immutable" # add error handling
    end
end