1
0
Fork 0
mirror of https://github.com/rubyjs/therubyracer synced 2023-03-27 23:21:42 -04:00
therubyracer/lib/v8/conversion/object.rb
2012-06-19 04:42:04 -05:00

28 lines
No EOL
380 B
Ruby

class V8::Conversion
module Object
def to_v8
Reference.construct! self
end
def to_ruby
self
end
end
module NativeObject
def to_ruby
wrap = if IsArray()
::V8::Array
elsif IsFunction()
::V8::Function
else
::V8::Object
end
wrap.new(self)
end
def to_v8
self
end
end
end