Hi there,
I am trying make structs reusable, consider the following structs:
structs/pet_store.rb
class PetStore < Dry::Struct
attribute :address, Types::String
attribute :cat, Pet
attribute :dog, Pet
end
structs/pet.rb
class Pet < Dry::Struct
attribute :name, Types::String
attribute :gender, Types::String
However im getting Attribute :name has already been defined (Dry::Struct::RepeatedAttributeError)
when starting my rails server
Any help would be appreciated, thanks!