How to access meta fields in structs

Hello,

Thank you for the great libs so far.

Quick question regarding the meta feature in Dry::Types. Can someone please let me know how to access the meta properties in the example below.

example:

class MyClass < Dry::Struct
  attribute :age, Types::Integer.meta(foo: :bar)
end

So in the example above I need to have access to the meta :foo prop.

Thank you in advance.
LP

Hey!

You can get it like this:

MyClass.schema.key(:age).meta
# => {:foo=>:bar}

Thank you mate!