This adds support for inferring base class from optional structs
class User < Dry::Struct
attribute :address, Dry::Struct.optional do
attribute :city, 'string'
end
end
Resolves #156
It doesn't work in more complex cases like arrays of optionals or optional arrays but I doubt these cases are common enough to bother, there's always another way to implement them.
This adds support for inferring base class from optional structs
Resolves #156 It doesn't work in more complex cases like arrays of optionals or optional arrays but I doubt these cases are common enough to bother, there's always another way to implement them.