Shopify / measured

Encapsulate measurements and their units in Ruby and Ruby on Rails.
MIT License
337 stars 28 forks source link

Split unit_for into a bang and non-bang version #52

Closed thegedge closed 7 years ago

thegedge commented 7 years ago

From @nicolaslupien's comment, we should suffix this function with an exclamation mark, since it raises. To keep things super tight, I've also went ahead with his suggestion to split the function. Unit tests already exist to check if to_unit_name and convert raise.

thegedge commented 7 years ago

Updated!