Class: PyCall::PyObjectWrapper::SwappedOperationAdapter

Inherits:
Object
  • Object
show all
Defined in:
lib/pycall/pyobject_wrapper.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(obj) ⇒ SwappedOperationAdapter

Returns a new instance of SwappedOperationAdapter.



91
92
93
# File 'lib/pycall/pyobject_wrapper.rb', line 91

def initialize(obj)
  @obj = obj
end

Instance Attribute Details

#objObject (readonly)

Returns the value of attribute obj.



95
96
97
# File 'lib/pycall/pyobject_wrapper.rb', line 95

def obj
  @obj
end

Instance Method Details

#%(other) ⇒ Object



113
114
115
# File 'lib/pycall/pyobject_wrapper.rb', line 113

def %(other)
  other.__rmod__(self.obj)
end

#&(other) ⇒ Object



129
130
131
# File 'lib/pycall/pyobject_wrapper.rb', line 129

def &(other)
  other.__rand__(self.obj)
end

#*(other) ⇒ Object



105
106
107
# File 'lib/pycall/pyobject_wrapper.rb', line 105

def *(other)
  other.__rmul__(self.obj)
end

#**(other) ⇒ Object



117
118
119
# File 'lib/pycall/pyobject_wrapper.rb', line 117

def **(other)
  other.__rpow__(self.obj)
end

#+(other) ⇒ Object



97
98
99
# File 'lib/pycall/pyobject_wrapper.rb', line 97

def +(other)
  other.__radd__(self.obj)
end

#-(other) ⇒ Object



101
102
103
# File 'lib/pycall/pyobject_wrapper.rb', line 101

def -(other)
  other.__rsub__(self.obj)
end

#/(other) ⇒ Object



109
110
111
# File 'lib/pycall/pyobject_wrapper.rb', line 109

def /(other)
  other.__rtruediv__(self.obj)
end

#<<(other) ⇒ Object



121
122
123
# File 'lib/pycall/pyobject_wrapper.rb', line 121

def <<(other)
  other.__rlshift__(self.obj)
end

#>>(other) ⇒ Object



125
126
127
# File 'lib/pycall/pyobject_wrapper.rb', line 125

def >>(other)
  other.__rrshift__(self.obj)
end

#^(other) ⇒ Object



133
134
135
# File 'lib/pycall/pyobject_wrapper.rb', line 133

def ^(other)
  other.__rxor__(self.obj)
end

#|(other) ⇒ Object



137
138
139
# File 'lib/pycall/pyobject_wrapper.rb', line 137

def |(other)
  other.__ror__(self.obj)
end