class PyCall::WrapperClassCache
Public Class Methods
instance()
click to toggle source
# File lib/pycall/pytypeobject_wrapper.rb, line 93 def self.instance @instance ||= self.new end
new()
click to toggle source
Calls superclass method
# File lib/pycall/pytypeobject_wrapper.rb, line 81 def initialize types = [LibPython::API::PyType_Type] types << LibPython::API::PyClass_Type if defined? LibPython::API::PyClass_Type super(*types) end
Public Instance Methods
check_wrapper_object(wrapper_object)
click to toggle source
# File lib/pycall/pytypeobject_wrapper.rb, line 87 def check_wrapper_object(wrapper_object) unless wrapper_object.kind_of?(Class) && wrapper_object.kind_of?(PyTypeObjectWrapper) raise TypeError, "unexpected type #{wrapper_object.class} (expected Class extended by PyTypeObjectWrapper)" end end