Class: Nydp::Builtin::Eval

Inherits:
Object show all
Includes:
Base
Defined in:
lib/nydp/builtin/eval.rb

Instance Method Summary collapse

Methods included from Base

#call, #handle_error, ignore_errors, #inspect, #name, #nydp_type, #to_s

Methods included from Helper

#cons, #list, #literal?, #pair?, #sig, #sym, #sym?

Methods included from Converter

#n2r, #r2n, #rubify

Constructor Details

#initialize(ns) ⇒ Eval

Returns a new instance of Eval.



4
5
6
7
# File 'lib/nydp/builtin/eval.rb', line 4

def initialize ns
  @ns = ns
  super()
end

Instance Method Details

#builtin_call(*args) ⇒ Object



9
10
11
12
# File 'lib/nydp/builtin/eval.rb', line 9

def builtin_call *args
  evaluator = Nydp::Evaluator.new @ns, "<eval>"
  evaluator.evaluate args.first
end