class PyBind::PyObjectStruct

Public Class Methods

null() click to toggle source
# File lib/pybind/struct.rb, line 8
def self.null
  new(FFI::Pointer::NULL)
end

Public Instance Methods

kind_of?(klass) click to toggle source
Calls superclass method
# File lib/pybind/struct.rb, line 16
def kind_of?(klass)
  case klass
  when PyBind::PyObjectStruct
    value = LibPython.PyObject_IsInstance(self, klass)
    raise PyError.fetch if value == -1
    value == 1
  else
    super
  end
end
none?() click to toggle source
# File lib/pybind/struct.rb, line 12
def none?
  PyBind.None.to_ptr == to_ptr
end
to_python()
Alias for: to_python_struct
to_python_struct() click to toggle source
# File lib/pybind/struct.rb, line 31
def to_python_struct
  self
end
Also aliased as: to_python
to_ruby() click to toggle source
# File lib/pybind/typecast.rb, line 24
def to_ruby
  TypeCast.from_python(self)
end
to_ruby_object() click to toggle source
# File lib/pybind/struct.rb, line 27
def to_ruby_object
  PyObject.new(self)
end