Sha256: bc1b642af5e7143708696c117b9ecfd077d840fa47c51e3b28148045f44b08b3
Contents?: true
Size: 1.42 KB
Versions: 13
Compression:
Stored size: 1.42 KB
Contents
# frozen_string_literal: true class Serega module SeregaPlugins module Batch # # Extensions (mini-plugins) that are enabled when :batch plugin used with other plugins # module PluginsExtensions # # Extension that is used when batch plugin used with :formatters plugin # module Formatters # # BatchLoader additional/patched instance methods # # @see Serega::SeregaPlugins::Batch::SeregaBatchLoader # module BatchLoaderInstanceMethods private # Format values after they are prepared def keys_values data = super formatter = point.attribute.formatter data.transform_values! { |value| formatter.call(value) } if formatter data end end # # SeregaAttribute additional/patched instance methods # # @see Serega::SeregaAttribute # module SeregaAttributeInstanceMethods # Normalized formatter block or callable instance # @return [#call, nil] Normalized formatter block or callable instance attr_reader :formatter private def set_normalized_vars(normalizer) super @formatter = normalizer.formatter end end end end end end end
Version data entries
13 entries across 13 versions & 1 rubygems