Shopify / measured

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

Use Numeric for Measurable #31

Closed thegedge closed 7 years ago

thegedge commented 7 years ago

Numeric supplies an interface for classes that act like numbers, and a Measurable fits this model. Coercion of [a, b] would require converting b to the same units of a.

This will also allow us to drop the Comparable portion of Measurable since Numeric gives us that for free.

kmcphillips commented 7 years ago

👍