Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/units/base.rb
Instance Method Summary collapse
-
#*(other) ⇒ Object
Cannot multiply a String by anything Numeric with units.
- #multiply ⇒ Object
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 |
#multiply ⇒ Object
164 |
# File 'lib/units/base.rb', line 164 alias :multiply :* |