module Dry::Struct::Setters::ClassMethods

Public Instance Methods

attributes(new_schema) click to toggle source
Calls superclass method
# File lib/dry/struct/setters.rb, line 28
def attributes(new_schema)
  super.tap do
    new_schema.each do |attribute, type|
      Dry::Struct::Setters.define_setter_for(struct: self, attribute: attribute, type: type)
    end
  end
end