lib/jx/js.rb
#------------------------------------------------------------------------------------
# Proxies a ruby object into a javascript object.  The javascript object captures
# all method calls and forwads them to a packed ruby object, by calling method 'run'
# on this packed object
# @param obj [Object] The ruby object to be proxied
# @return [JSObject]
#------------------------------------------------------------------------------------
Proxies a ruby object into a javascript object.  The javascript object captures
all method calls and forwads them to a packed ruby object, by calling method 'run'
on this packed object
Proxies a ruby object into a javascript object . The javascript object captures all method calls and forwads them to a packed ruby object by calling method ' run ' on this packed object
def proxy(obj)
      case obj
      when TrueClass, FalseClass, Numeric, String, NilClass
        obj
      when Java::ComTeamdevJxbrowserChromium::JSValue
        JSObject.build(obj)
      when Proc
        blk2func(obj)
      else
        raise "No method to proxy the given object: #{obj}"
      end
    end
def proxy ( obj ) case obj when TrueClass , FalseClass , Numeric , String , NilClass obj when Java :: ComTeamdevJxbrowserChromium :: JSValue JSObject . build ( obj ) when Proc blk2func ( obj ) else raise "No method to proxy the given object: #{obj}" end end
Proxies a ruby object into a javascript object.
Proxies a ruby object into a javascript object .
None
JSObject
obj
The ruby object to be proxied
The ruby object to be proxied