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

8 lines
153 B
Ruby
Raw Normal View History

class Object
def eval_js(source, options = {})
Rhino::Context.open(options.merge(:with => self)) do |cxt|
cxt.eval(source)
end
end
end