Module: Rhino::Ruby

Defined in:
lib/rhino/ruby.rb,
lib/rhino/ruby/access.rb,
lib/rhino/ruby/default_access.rb,
lib/rhino/ruby/attribute_access.rb

Defined Under Namespace

Modules: AttributeAccess, DefaultAccess, Scriptable Classes: Constructor, Function, Object

Class Method Summary collapse

Class Method Details

.cache(key, &block) ⇒ Object



214
215
216
217
# File 'lib/rhino/ruby.rb', line 214

def self.cache(key, &block)
  context = JS::Context.getCurrentContext
  context ? context.cache(key, &block) : yield
end

.wrap_error(e) ⇒ Object



5
6
7
# File 'lib/rhino/ruby.rb', line 5

def self.wrap_error(e)
  JS::WrappedException.new(org.jruby.exceptions.RaiseException.new(e))
end