Dave Copeland :ruby: on Nostr: The two things I like about this gem (that I created some or most of a long time ago ...
The two things I like about this gem (that I created some or most of a long time ago :) that Data does not have are:
• If a field ends in a “?”, e.g. :new?, then it will be coerced into a boolean, e.g. active: nil will cause active? to return false
• If a field is a single-element array with a symbol, it will be coerced into an array—never nil.
I'm not sure these are strong-enough reasons to adopt it over Data, but I liked those features :)
https://ruby.social/@soulcutter/114066641156424488
• If a field ends in a “?”, e.g. :new?, then it will be coerced into a boolean, e.g. active: nil will cause active? to return false
• If a field is a single-element array with a symbol, it will be coerced into an array—never nil.
I'm not sure these are strong-enough reasons to adopt it over Data, but I liked those features :)
https://ruby.social/@soulcutter/114066641156424488