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.



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

def initialize(obj)
  @obj = obj
end

Instance Attribute Details

#obj ⇒ Object (readonly)

Returns the value of attribute obj.



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

def obj
  @obj
end

Instance Method Details

#%(other) ⇒ Object



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

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

#&(other) ⇒ Object



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

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

#*(other) ⇒ Object



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

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

#**(other) ⇒ Object



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

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

#+(other) ⇒ Object



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

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

#-(other) ⇒ Object



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

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

#/(other) ⇒ Object



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

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

#<<(other) ⇒ Object



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

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

#>>(other) ⇒ Object



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

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

#^(other) ⇒ Object



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

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

#|(other) ⇒ Object



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

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