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

18 lines
262 B
Ruby
Raw Normal View History

2009-12-18 02:48:06 -05:00
module V8
class Object
def initialize(native)
@native = native
end
def [](key)
To.ruby(@native.Get(key.to_s))
end
def []=(key, value)
value.tap do
@native.Set(key.to_s, value)
end
2009-12-18 02:48:06 -05:00
end
end
end