Module: Danica::BaseOperations

Instance Method Summary collapse

Instance Method Details

#*(other) ⇒ Object



9
10
11
# File 'lib/danica/base_operations.rb', line 9

def *(other)
  formatted_operation other, multiplication(self, other)
end

#**(other) ⇒ Object



21
22
23
# File 'lib/danica/base_operations.rb', line 21

def **(other)
  formatted_operation other, power(self, other)
end

#+(other) ⇒ Object



5
6
7
# File 'lib/danica/base_operations.rb', line 5

def +(other)
  formatted_operation other, addition(self, other)
end

#-(other) ⇒ Object



17
18
19
# File 'lib/danica/base_operations.rb', line 17

def -(other)
  formatted_operation other, (self + negative(other))
end

#-@Object



25
26
27
# File 'lib/danica/base_operations.rb', line 25

def -@
  negative(self)
end

#/(other) ⇒ Object



13
14
15
# File 'lib/danica/base_operations.rb', line 13

def /(other)
  formatted_operation other, division(self, other)
end