Method: RubyPython::PyObject#getAttr

Defined in:
lib/rubypython/pyobject.rb

#getAttr(attrName) ⇒ Object

Retrieves an object from the wrapped Python object.

attrName

The name of the attribute to fetch.



91
92
93
94
# File 'lib/rubypython/pyobject.rb', line 91

def getAttr(attrName)
  pyAttr = RubyPython::Python.PyObject_GetAttrString(@pointer, attrName)
  self.class.new pyAttr
end