class Dhallish::Context

Public Class Methods

new(outercontext=nil) click to toggle source
# File lib/types.rb, line 369
def initialize(outercontext=nil)
        @outercontext = outercontext
        @scope = {}
end

Public Instance Methods

[](varname) click to toggle source
# File lib/types.rb, line 374
def [](varname)
        val = @scope[varname]
        if val.nil? && !@outercontext.nil?
                @outercontext[varname]
        else
                val
        end
end
[]=(varname, value) click to toggle source
# File lib/types.rb, line 383
def []=(varname, value)
        @scope[varname] = value
end