Module: Jscall::Interface

Included in:
Jscall, AsyncInterface
Defined in:
lib/jscall.rb

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args) ⇒ Object



494
495
496
# File 'lib/jscall.rb', line 494

def method_missing(name, *args)
    funcall(name, *args)
end

Instance Method Details

#async_exec(src) ⇒ Object



475
476
477
# File 'lib/jscall.rb', line 475

def async_exec(src)
    __getpipe__.async_exec(src)
end

#async_funcall(name, *args) ⇒ Object



486
487
488
# File 'lib/jscall.rb', line 486

def async_funcall(name, *args)
    __getpipe__.async_funcall(nil, name, args)
end

#dyn_import(name, var_name = nil) ⇒ Object



490
491
492
# File 'lib/jscall.rb', line 490

def dyn_import(name, var_name=nil)
    funcall('Ruby.dyn_import', name, var_name)
end

#exec(src) ⇒ Object



471
472
473
# File 'lib/jscall.rb', line 471

def exec(src)
    __getpipe__.exec(src)
end

#funcall(name, *args) ⇒ Object

name is a string object. Evaluating this string in JavaScript results in a JavaScript function.



482
483
484
# File 'lib/jscall.rb', line 482

def funcall(name, *args)
    __getpipe__.funcall(nil, name, args)
end