Sha256: a438db2cc48e79f89202e34ca0fca5b80d4fe44e1f174a4b14f9b866065c91e1
Contents?: true
Size: 465 Bytes
Versions: 39
Compression:
Stored size: 465 Bytes
Contents
# frozen_string_literal: true class ActiveStorage::NamedVariant # :nodoc: attr_reader :transformations, :preprocessed def initialize(transformations) @preprocessed = transformations[:preprocessed] @transformations = transformations.except(:preprocessed) end def preprocessed?(record) case preprocessed when Symbol record.send(preprocessed) when Proc preprocessed.call(record) else preprocessed end end end
Version data entries
39 entries across 39 versions & 5 rubygems