Apologies if I’m missing something, but say I have a hash
"Delivered"=>"2017-11-21 11:52 AM"
and an object:
class OrderStatus < Dry::Struct
attribute :user_id, Types::String
attribute :tracking_number, Types::String
attribute :delivered_at, Types::DateTime
How can I map from the weird camel cased attribute to the ones in my Ruby object? I could name the attributes to be the name in the hash, e.g.
attribute :UserID and them alias them, but I’d love to avoid that.