class Farts::AttributeSyntaxNode

Public Class Methods

new( lineno, vname, vattr ) click to toggle source
# File lib/farts/farts_parser.rb, line 730
def initialize( lineno, vname, vattr )
  super lineno
  @vname = vname
  @vattr = vattr
end

Public Instance Methods

execute(intp) click to toggle source
# File lib/farts/farts_parser.rb, line 736
def execute(intp)
  begin
  if intp.vars.has_key?(@vname)
      intp.vars[@vname].send(@vattr.intern)
    else
      fart_err("unknown local variable '#{@vname}'")
    end
  rescue NameError
    fart_err($!.message)
  end
end