Module: V8::Weak::Cell

Included in:
Conversion::Code
Defined in:
lib/v8/weak.rb

Defined Under Namespace

Classes: Storage

Instance Method Summary collapse

Instance Method Details

#weakcell(name, &block) ⇒ Object



57
58
59
60
61
62
# File 'lib/v8/weak.rb', line 57

def weakcell(name, &block)
  unless storage = instance_variable_get("@#{name}")
    storage = instance_variable_set("@#{name}", Storage.new)
  end
  storage.access(&block)
end