Shopify / measured

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

Convert `ConversionTable` to module functions #38

Closed thegedge closed 7 years ago

thegedge commented 7 years ago

ConversionTable makes no sense, but rather encapsulates a set of operations to create a Hash for unit conversion. Since it's not meant to stick around we should just stick to exposing a function.

kmcphillips commented 7 years ago

I'm pretty so so on this. It's just a small object to encapsulate a set of resolution operations, generating an output.

If you mean switching it from instantiation to module functions I'm ok with that.

thegedge commented 7 years ago

If you mean switching it from instantiation to module functions I'm ok with that.

Yep, that's what I mean. If there's no need for polymorphism, procedural programming is a perfectly good paradigm 😄

I'll be sure to double check and make sure this won't cause any issues when it comes to testability, but I don't think it will.

kmcphillips commented 7 years ago

No that should be good then. 👌