grocery unit prices: implement stub
grocery unit prices: implement stub: a task in smol-software-harbor (Harbor dataset). UnitPrice.per unit in lib/unit price.rb is a stub, so UnitPrice.best crashes. Implement it as its comment says: the price per kg or per litre in cents, rounded to the nearest cent, for sizes written as 500 g …
The task
`UnitPrice.per_unit` in `lib/unit_price.rb` is a stub, so `UnitPrice.best` crashes. Implement it as its comment says: the price per kg or per litre in cents, rounded to the nearest cent, for sizes written as `500 g`, `1.5 kg`, `750 ml` or `2 l` (unit case does not matter). Run `for f in test/*_test.rb; do ruby -Ilib…
Part of efederici/smol-software-harbor.