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: DeprecatedAccess, Scriptable Classes: AccessBase, AttributeAccess, Constructor, DefaultAccess, Exception, Function, Object

Class Method Summary collapse

Class Method Details

.cache(key, &block) ⇒ Object


245
246
247
248
# File 'lib/rhino/ruby.rb', line 245

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

.wrap_error(e) ⇒ Object


265
266
267
# File 'lib/rhino/ruby.rb', line 265

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