Sha256: 32535ec506ad79197c1eaa58ccb3bd3628427d4ce2c16d938d42c970ab731208
Contents?: true
Size: 1.17 KB
Versions: 7
Compression:
Stored size: 1.17 KB
Contents
# frozen_string_literal: true require 'singleton' module PaperTrailScrapbook # Global configuration affecting all threads. class Config include Singleton DEFAULT_TIME_FORMAT = '%A, %d %b %Y at %l:%M %p' DEFAULT_EVENTS = { 'create' => 'created', 'update' => 'updated', 'destroy' => 'destroyed' }.freeze SCRUB_COLUMNS = %w[updated_at created_at id].freeze UNKNOWN_WHODUNNIT = '*the app*' attr_accessor :whodunnit_class, :time_format, :events, :scrub_columns, :drop_id_suffix, :unknown_whodunnit, :invalid_whodunnit, :filter_non_changes, :recent_first def initialize @whodunnit_class = nil @time_format = DEFAULT_TIME_FORMAT @events = DEFAULT_EVENTS @scrub_columns = SCRUB_COLUMNS @unknown_whodunnit = UNKNOWN_WHODUNNIT @invalid_whodunnit = proc { |w| "*missing (#{w})*" } @drop_id_suffix = true @filter_non_changes = true @recent_first = false end end end
Version data entries
7 entries across 7 versions & 1 rubygems