class PyCall::WrapperObjectCache::Key

Attributes

address[R]

Public Class Methods

[](address) click to toggle source
# File lib/pycall/wrapper_object_cache.rb, line 25
def self.[](address)
  # An instance of Key created here is parmanently cached in @address_key_map.
  # This behavior is intentional.
  @address_key_map[address] ||= new(address)
end
new(address) click to toggle source
# File lib/pycall/wrapper_object_cache.rb, line 31
def initialize(address)
  @address = address
end

Public Instance Methods

==(other) click to toggle source
Calls superclass method
# File lib/pycall/wrapper_object_cache.rb, line 37
def ==(other)
  case other
  when Key
    self.address == other.address
  else
    super
  end
end