require 'fiona7/attribute_writers/attribute_writer' require 'fiona7/attribute_writers/helpers/link_serializer' module Fiona7 module AttributeWriters class LinklistAsLinklist < AttributeWriter def call(value, claimed_type=nil) links = (value || []).map do |link| Helpers::LinkSerializer.new(self.obj, self.klass).call(link) end self.obj.set(self.attr_name, links) end end end end