class Medusa::Sandbox

Defined in:

medusa/sandbox.cr

Constant Summary

Log = ::Log.for(self)

Constructors

Instance Method Summary

Constructor Detail

def self.new #

[View source]
def self.new(*, raw : Bool) #

[View source]

Instance Method Detail

def bind(name : String, arg_count : Int32 = 0, &block : Array(ValueWrapper) -> _) : Nil #

[View source]
def bind_raw(name : String, arg_count : Int32 = 0, &block : Proc(QuickJS::JSContext, QuickJS::JSValue, LibC::Int, Pointer(QuickJS::JSValue), QuickJS::JSValue)) : Nil #

[View source]
def call_global(name : String, arguments : Array = [] of ValueWrapper) : ValueWrapper #

[View source]
def close : Nil #

[View source]
def closed? : Bool #

[View source]
def compile(source_code : String, tag : String = "<compile>") : Bytes #

[View source]
def drain_jobs : Int32 #

[View source]
def engine : Engine #

[View source]
def eval!(source_code : String, flag : QuickJS::EvalFlag = QuickJS::EvalFlag::STRICT, tag : String = "<input>") : ValueWrapper #

[View source]
def eval_mutex!(source_code : String, flag : QuickJS::EvalFlag = QuickJS::EvalFlag::STRICT, tag : String = "<input>") : ValueWrapper #

[View source]
def finalize #

[View source]
def gc_threshold=(threshold : UInt64) : Nil #

[View source]
def get_global(name : String) : ValueWrapper | Nil #

[View source]
def json_stringify(obj : ValueWrapper) : String #

[View source]
def load_auto!(path : String) : ValueWrapper #

[View source]
def load_bytecode(bytecode : Bytes) : ValueWrapper #

[View source]
def load_file!(path : String) : ValueWrapper #

[View source]
def load_module!(path : String) : ValueWrapper #

[View source]
def max_stack_size=(size : UInt64) : Nil #

[View source]
def memory_limit=(limit : UInt64) : Nil #

[View source]
def memory_usage : QuickJS::JSMemoryUsage #

[View source]
def parse_json(input : String) : ValueWrapper #

[View source]
def run_gc : Nil #

[View source]
def set_global(name : String, value) : Nil #

[View source]