Class: RubyPython::RubyPyClass

Inherits:
RubyPyProxy show all
Defined in:
lib/rubypython/rubypyproxy.rb

Overview

A class to wrap Python classes.

Instance Attribute Summary

Attributes inherited from RubyPyProxy

#pObject

Instance Method Summary collapse

Methods inherited from RubyPyProxy

#initialize, #inspect, #is_real_method?, #method_missing, #methods, #respond_to?, #rubify, #to_a, #to_enum, #to_s

Methods included from Operators

#<=>, #[], #[]=, bin_op, #include?, operator_, python_interpreter_update, rel_op, unary_op

Methods inherited from BlankObject

hide

Constructor Details

This class inherits a constructor from RubyPython::RubyPyProxy

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class RubyPython::RubyPyProxy

Instance Method Details

#new(*args) ⇒ Object

Create an instance of the wrapped class. This is a workaround for the fact that Python classes are meant to be callable.



302
303
304
305
# File 'lib/rubypython/rubypyproxy.rb', line 302

def new(*args)
  pReturn =  _method_call(@pObject, args, nil)
  RubyPyInstance.new pReturn
end