require 'fiona7/attribute_writers/attribute_writer' require 'fiona7/attribute_writers/helpers/json_serializer' module Fiona7 module AttributeWriters class StringlistAsText < AttributeWriter def call(value, claimed_type=nil) if self.attr_name.to_s == "channels" self.obj.set(:channels, value || []) else self.obj.set(self.attr_name, Helpers::JsonSerializer.new.call(value || [])) end end end end end