class V8::Weak::Cell::Storage
Public Instance Methods
access(&block)
click to toggle source
# File lib/v8/weak.rb, line 52 def access(&block) if @ref @ref.object || populate(block) else populate(block) end end
Private Instance Methods
populate(block)
click to toggle source
# File lib/v8/weak.rb, line 62 def populate(block) occupant = block.call() @ref = V8::Weak::Ref.new(occupant) return occupant end