Module: ParamsReady::Marshaller::TupleMarshallers::AbstractMarshaller

Included in:
ArrayMarshaller, StringMarshaller, StructMarshaller
Defined in:
lib/params_ready/marshaller/tuple_marshallers.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.marshal_fields(fields, intent) ⇒ Object



9
10
11
12
13
# File 'lib/params_ready/marshaller/tuple_marshallers.rb', line 9

def self.marshal_fields(fields, intent)
  fields.map do |field|
    field.format(intent)
  end
end

Instance Method Details

#marshal(parameter, intent) ⇒ Object



15
16
17
18
19
# File 'lib/params_ready/marshaller/tuple_marshallers.rb', line 15

def marshal(parameter, intent)
  fields = parameter.send(:bare_value)
  fields = AbstractMarshaller.marshal_fields(fields, intent)
  do_marshal(fields, intent)
end