In Files

Parent

Methods

Files

V8::Weak::WeakValueMap

Public Class Methods

new() click to toggle source
# File lib/v8/weak.rb, line 31
def initialize
  @values = {}
end

Public Instance Methods

[](key) click to toggle source
# File lib/v8/weak.rb, line 35
def [](key)
  if ref = @values[key]
    ref.object
  end
end
[]=(key, value) click to toggle source
# File lib/v8/weak.rb, line 41
def []=(key, value)
  @values[key] = V8::Weak::Ref.new(value)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.