Module: Dry::Struct::Setters::MassAssignment

Included in:
WithSetters
Defined in:
lib/dry/struct/setters/mass_assignment.rb

Instance Method Summary collapse

Instance Method Details

#assign_attributes(attributes = {}) ⇒ Object



7
8
9
10
11
# File 'lib/dry/struct/setters/mass_assignment.rb', line 7

def assign_attributes(attributes = {})
  attributes.each do |attribute, value|
    public_send("#{attribute}=", value)
  end
end