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.



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

def initialize(obj)
  @obj = obj
end

Instance Attribute Details

#objObject (readonly)

Returns the value of attribute obj.



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

def obj
  @obj
end

Instance Method Details

#%(other) ⇒ Object



119
120
121
# File 'lib/pycall/pyobject_wrapper.rb', line 119

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

#&(other) ⇒ Object



135
136
137
# File 'lib/pycall/pyobject_wrapper.rb', line 135

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

#*(other) ⇒ Object



111
112
113
# File 'lib/pycall/pyobject_wrapper.rb', line 111

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

#**(other) ⇒ Object



123
124
125
# File 'lib/pycall/pyobject_wrapper.rb', line 123

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

#+(other) ⇒ Object



103
104
105
# File 'lib/pycall/pyobject_wrapper.rb', line 103

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

#-(other) ⇒ Object



107
108
109
# File 'lib/pycall/pyobject_wrapper.rb', line 107

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

#/(other) ⇒ Object



115
116
117
# File 'lib/pycall/pyobject_wrapper.rb', line 115

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

#<<(other) ⇒ Object



127
128
129
# File 'lib/pycall/pyobject_wrapper.rb', line 127

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

#>>(other) ⇒ Object



131
132
133
# File 'lib/pycall/pyobject_wrapper.rb', line 131

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

#^(other) ⇒ Object



139
140
141
# File 'lib/pycall/pyobject_wrapper.rb', line 139

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

#|(other) ⇒ Object



143
144
145
# File 'lib/pycall/pyobject_wrapper.rb', line 143

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