Sha256: f7d9c357cbdb361f2d229aa183d5ffcb41257b3c87897b2571d499d3806ff5ef

Contents?: true

Size: 370 Bytes

Versions: 10

Compression:

Stored size: 370 Bytes

Contents

require 'fiona7/attribute_writers/attribute_writer'
require 'fiona7/attribute_writers/helpers/json_serializer'

module Fiona7
  module AttributeWriters
    class ReferencelistAsText < AttributeWriter
      def call(value, claimed_type=nil)
        ids = value || []
        self.obj.set(self.attr_name, Helpers::JsonSerializer.new.call(ids))
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
infopark_fiona7-1.2.0.2.3 lib/fiona7/attribute_writers/referencelist_as_text.rb
infopark_fiona7-1.2.0.2.1 lib/fiona7/attribute_writers/referencelist_as_text.rb
infopark_fiona7-1.2.0.2.2 lib/fiona7/attribute_writers/referencelist_as_text.rb
infopark_fiona7-1.2.0.1.4 lib/fiona7/attribute_writers/referencelist_as_text.rb
infopark_fiona7-1.2.0.1.3 lib/fiona7/attribute_writers/referencelist_as_text.rb
infopark_fiona7-1.5.3.2.0 lib/fiona7/attribute_writers/referencelist_as_text.rb
infopark_fiona7-1.5.3.2.0.pre.beta1 lib/fiona7/attribute_writers/referencelist_as_text.rb
infopark_fiona7-1.5.2.1.0.pre.beta1 lib/fiona7/attribute_writers/referencelist_as_text.rb
infopark_fiona7-1.5.2.0.0 lib/fiona7/attribute_writers/referencelist_as_text.rb
infopark_fiona7-1.2.0.1.1 lib/fiona7/attribute_writers/referencelist_as_text.rb