Sha256: 7daa37e977536aa823bcb57f714c8f860252a78562fa68bd7c5d9c968b094b52

Contents?: true

Size: 258 Bytes

Versions: 13

Compression:

Stored size: 258 Bytes

Contents

class Object
  
  unless method_defined?(:tap)
    def tap # :nodoc:
      yield self
      self
    end
  end
  
  def eval_js(source, options = {})
    Rhino::Context.open(options.merge(:with => self)) do |cxt|
      cxt.eval(source)
    end
  end
  
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
therubyrhino-2.1.2 lib/rhino/object.rb
therubyrhino-2.0.5 lib/rhino/object.rb
therubyrhino-2.1.1 lib/rhino/object.rb
therubyrhino-2.0.4 lib/rhino/object.rb
therubyrhino-2.0.3 lib/rhino/object.rb
therubyrhino-2.0.2 lib/rhino/object.rb
therubyrhino-2.0.1 lib/rhino/object.rb
therubyrhino-2.0.0 lib/rhino/object.rb
therubyrhino-1.73.5 lib/rhino/object.rb
therubyrhino-1.73.4 lib/rhino/object.rb
therubyrhino-1.73.3 lib/rhino/object.rb
therubyrhino-1.73.2 lib/rhino/object.rb
therubyrhino-1.73.1 lib/rhino/object.rb