1
0
Fork 0
mirror of https://github.com/rubyjs/therubyrhino synced 2023-03-27 23:21:34 -04:00
therubyrhino/lib/rhino/java.rb

20 lines
390 B
Ruby
Raw Normal View History

2009-09-24 20:06:31 -04:00
require 'java'
require 'rhino/rhino-1.7R2.jar'
module Rhino
# This module contains all the native Rhino objects implemented in Java
# e.g.
# Rhino::J::NativeObject # => org.mozilla.javascript.NativeObject
2009-09-24 20:06:31 -04:00
module J
import "org.mozilla.javascript"
end
end
unless Object.method_defined?(:tap)
class Object #:nodoc:
def tap
yield self
self
end
end
2009-09-24 20:06:31 -04:00
end