2009-12-18 02:48:06 -05:00
|
|
|
|
|
|
|
module V8
|
|
|
|
class Object
|
|
|
|
def initialize(native)
|
|
|
|
@native = native
|
|
|
|
end
|
|
|
|
|
|
|
|
def [](key)
|
2010-01-10 05:02:08 -05:00
|
|
|
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
|