Sha256: dfd56e37673d7f0cb4d11510c6c66ab842782bc8b0ed43e55f770fc7ae37f694
Contents?: true
Size: 448 Bytes
Versions: 19
Compression:
Stored size: 448 Bytes
Contents
require 'fiona7/attribute_writers/attribute_writer' module Fiona7 module AttributeWriters class ReferenceAsLinklist < AttributeWriter def call(value, claimed_type=nil) # FIXME: use a repository to improve performance obj = self.klass.find(value) rescue nil if obj self.obj.set(self.attr_name, [obj.path]) else self.obj.set(self.attr_name, []) end end end end end
Version data entries
19 entries across 19 versions & 1 rubygems