class TestML::Function

Attributes

data[RW]
namespace[RW]
signature[RW]
statements[RW]

Public Class Methods

new() click to toggle source
# File lib/testml/runtime.rb, line 268
def initialize
  @statements = []
end

Public Instance Methods

forgetvar(name) click to toggle source
# File lib/testml/runtime.rb, line 287
def forgetvar name
  namespace.delete name
end
getvar(name) click to toggle source
# File lib/testml/runtime.rb, line 272
def getvar name
  s = self
  while s
    if s.namespace.key? name
      return s.namespace[name]
    end
    s = s.outer
  end
  nil
end
outer() click to toggle source
# File lib/testml/runtime.rb, line 263
def outer; @@outer[self.object_id] end
outer=(value) click to toggle source
# File lib/testml/runtime.rb, line 264
def outer=(value); @@outer[self.object_id] = value end
setvar(name, value) click to toggle source
# File lib/testml/runtime.rb, line 283
def setvar name, value
  namespace[name] = value
end
type() click to toggle source
# File lib/testml/runtime.rb, line 265
def type; 'Func' end