Adding meta(ommitable: true) for custom Struct


#1

How can I make my Struct ommitable when using it as the type in another struct?

class A < Dry::Struct 
  ..
end

class B < Dry::Struct
  attribute :a, A.meta(omittable: true) 
end

The above gives the error:

NoMethodError (undefined methodmeta’ for A:Class)`

Thanks. Great library btw


#2

@i2chris which version of the gem are you using?


#3

Good point, upgrading from dry-struct 0.4.0 to 0.5.0 fixed it. Thanks