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,
lib/rhino/rhino_ext.rb

Defined Under Namespace

Modules: DeprecatedAccess, FunctionCall, Scriptable Classes: AccessBase, AttributeAccess, Constructor, DefaultAccess, Exception, Function, Object

Class Method Summary collapse

Class Method Details

.cache(key, &block) ⇒ Object



249
250
251
252
# File 'lib/rhino/ruby.rb', line 249

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

.wrap_error(e) ⇒ Object



269
270
271
# File 'lib/rhino/ruby.rb', line 269

def self.wrap_error(e)
  Exception.new(e)
end