Exception: Converty::UnitError
Overview
Thrown when a non-existant unit type is passed into the from and/or to param when converting.
Instance Method Summary collapse
-
#initialize(units) ⇒ UnitError
constructor
A new instance of UnitError.
Constructor Details
#initialize(units) ⇒ UnitError
Returns a new instance of UnitError.
23 24 25 26 |
# File 'lib/converty.rb', line 23 def initialize(units) = units.map { |u| "#{u} is an invalid unit" }.join(", ") super() end |