Class: V8::Conversion::Method::MethodCache

Inherits:
Object
  • Object
show all
Defined in:
lib/v8/conversion/method.rb

Instance Method Summary collapse

Constructor Details

#initializeMethodCache

Returns a new instance of MethodCache.



11
12
13
# File 'lib/v8/conversion/method.rb', line 11

def initialize
  @map = V8::Weak::WeakValueMap.new
end

Instance Method Details

#[](method) ⇒ Object



15
16
17
# File 'lib/v8/conversion/method.rb', line 15

def [](method)
  @map[method.to_s]
end

#[]=(method, template) ⇒ Object



19
20
21
# File 'lib/v8/conversion/method.rb', line 19

def []=(method, template)
  @map[method.to_s] = template
end