class Integer

Public Instance Methods

*(other) click to toggle source
# File lib/pulo/quantity/numeric_overloads.rb, line 197
def *(other)
  if other.is_a?(Pulo::Quantity)
    other*self
  else
    self.old_times(other)
  end
end
Also aliased as: old_times
+(other) click to toggle source
# File lib/pulo/quantity/numeric_overloads.rb, line 129
def +(other)
  if other.is_a?(Pulo::Dimensionless)
    Pulo::Dimensionless.new(self+other.to_base_unit.value)
  else
    self.old_plus(other)
  end
end
Also aliased as: old_plus
-(other) click to toggle source
# File lib/pulo/quantity/numeric_overloads.rb, line 96
def -(other)
  if other.is_a?(Pulo::Dimensionless)
    Pulo::Dimensionless.new(self-other.to_base_unit.value)
  else
    self.old_minus(other)
  end
end
Also aliased as: old_minus
/(other) click to toggle source
# File lib/pulo/quantity/numeric_overloads.rb, line 163
def /(other)
  if other.is_a?(Pulo::Quantity)
    other.inverse*self
  else
    self.old_div(other)
  end
end
Also aliased as: old_div
old_div(other)
Alias for: /
old_minus(other)
Alias for: -
old_plus(other)
Alias for: +
old_times(other)
Alias for: *