module NxtSupport::PreprocessAttributes

Public Instance Methods

preprocess_attributes(*attributes, **options) click to toggle source
# File lib/nxt_support/models/preprocess_attributes.rb, line 8
def preprocess_attributes(*attributes, **options)
  attributes_to_process =
    if attributes.any?
      attributes.map(&:to_sym)
    else
      column_names.map(&:to_sym)
    end

  @nxt_preprocessors ||= []
  @nxt_preprocessors << NxtSupport::Preprocessor.new(attributes_to_process, options)
end

Private Instance Methods

nxt_preprocessors() click to toggle source
# File lib/nxt_support/models/preprocess_attributes.rb, line 31
def nxt_preprocessors
  self.class.nxt_preprocessors
end