class V8::Weak::WeakValueMap
Public Class Methods
new()
click to toggle source
# File lib/v8/weak.rb, line 28 def initialize @values = {} end
Public Instance Methods
[](key)
click to toggle source
# File lib/v8/weak.rb, line 32 def [](key) if ref = @values[key] ref.object end end
[]=(key, value)
click to toggle source
# File lib/v8/weak.rb, line 38 def []=(key, value) @values[key] = V8::Weak::Ref.new(value) end