Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/units/base.rb

Instance Method Summary collapse

Instance Method Details

#*(other) ⇒ Object

Cannot multiply a String by anything Numeric with units



166
167
168
169
170
171
172
# File 'lib/units/base.rb', line 166

def *(other)
  if Numeric === other && other.kind
    raise UnitsError, "cannot multiply a String by anything Numeric with units"
  else
    multiply other
  end
end

#multiplyObject



164
# File 'lib/units/base.rb', line 164

alias :multiply :*