Sha256: e6f8aa3108d6fec87e985cbb16d2cd5d62b5271edbccfb87f60aa58917627ef2
Contents?: true
Size: 666 Bytes
Versions: 19
Compression:
Stored size: 666 Bytes
Contents
require 'fiona7/attribute_readers/attribute_reader' require 'fiona7/blob_id_generator' module Fiona7 module AttributeReaders class BinaryAsLinklist < AttributeReader def call if !Fiona7.mode == :legacy || !self.obj.binary? deserialize_binary(self.obj.attr_values[self.attr_name].try(:first)) else {id: Fiona7::BlobIdGenerator.new(self.obj.id, self.obj.last_changed).call} end end protected def deserialize_binary(link) if link binary_id = link["title"] if binary_id.length == 32 {id: binary_id} end end end end end end
Version data entries
19 entries across 19 versions & 1 rubygems