These are chat archives for dry-rb/chat

May 2017
Cyril Sadovnik
May 30 2017 11:00

Hi guys!

I'm trying to make a structure using dry-struct. I need to restrict an attribute to have only instances of a specific class.

I found that there is Types::Class type in dry-types. How do I specify an exact class?

Cyril Sadovnik
May 30 2017 15:35
@flash-gordon and @v-kolesnikov suggest these options: Foo)
Dry::Types.module::Any.constrained(type: Foo)