These are chat archives for intridea/hashie

28th
Oct 2016
Jesse Trimble
@jtrim
Oct 28 2016 22:59
Hi! Using Hashie::Extensions::Coercion, I've got a bit of data I'm trying to coerce into Hash[String => Hash[String => BigDecimal]], but the BigDecimal part of that can also be nil - is there a way to handle that scenario that I'm missing (other than creating new classes to coerce to)? Getting Hashie::CoercionError: Cannot coerce property :property_name from Hash to {String=>{String=>BigDecimal}}: no implicit conversion of nil into String when I hit a nil value in that BigDecimal field
Jesse Trimble
@jtrim
Oct 28 2016 23:12
I suppose I could make a thin wrapper around BigDecimal that handles nil values in a better way for my use case
Yep, that works. Sorry for posting a question I answered myself :\