module ParamsReady::Marshaller::HashSetMarshallers::HashMarshaller

Public Class Methods

canonicalize(definition, hash, context, validator) click to toggle source
# File lib/params_ready/marshaller/hash_set_marshallers.rb, line 24
def self.canonicalize(definition, hash, context, validator)
  canonicalize_collection(definition, context, validator) do |child|
    _, value = child.find_in_hash(hash, context)
    value
  end
end
marshal(parameter, intent) click to toggle source
# File lib/params_ready/marshaller/hash_set_marshallers.rb, line 31
def self.marshal(parameter, intent)
  if intent.marshal? parameter.name_for_formatter
    HashMarshallers::HashMarshaller.marshal(parameter, intent)
  else
    SetMarshaller.marshal(parameter, intent)
  end
end