class ParamsReady::Marshaller::TupleMarshallers::StringMarshaller

Attributes

separator[R]

Public Class Methods

instance(separator:) click to toggle source
# File lib/params_ready/marshaller/tuple_marshallers.rb, line 70
def self.instance(separator:)
  instance = new separator
  [String, instance.freeze]
end
new(separator) click to toggle source
# File lib/params_ready/marshaller/tuple_marshallers.rb, line 75
def initialize(separator)
  @separator = separator.to_s.freeze
end

Public Instance Methods

canonicalize(definition, string, context, validator) click to toggle source
# File lib/params_ready/marshaller/tuple_marshallers.rb, line 79
def canonicalize(definition, string, context, validator)
  array = string.split(separator)
  ArrayMarshaller.canonicalize(definition, array, context, validator)
end
do_marshal(fields, _) click to toggle source
# File lib/params_ready/marshaller/tuple_marshallers.rb, line 84
def do_marshal(fields, _)
  fields.join(separator)
end