module ParamsReady::Marshaller::HashSetMarshallers::AbstractMarshaller

Public Instance Methods

canonicalize_collection(definition, context, validator, freeze: false) { |child| ... } click to toggle source
# File lib/params_ready/marshaller/hash_set_marshallers.rb, line 8
def canonicalize_collection(definition, context, validator, freeze: false)
  hash = {}
  definition.names.each do |name, definition|
    child = definition.create
    value = yield child
    child.set_from_input(value, context, validator)
    child.freeze if freeze
    hash[name] = child
  end
  [hash, validator]
end