Class: PaperTrailScrapbook::Config Private

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/paper_trail_scrapbook/config.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Global configuration affecting all threads.

Constant Summary collapse

DEFAULT_TIME_FORMAT =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

'%A, %d %b %Y at %l:%M %p'
DEFAULT_EVENTS =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

{ 'create' => 'created',
'update' => 'updated',
'destroy' => 'destroyed' }.freeze
SCRUB_COLUMNS =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

%w[updated_at created_at id].freeze
UNKNOWN_WHODUNNIT =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

'*the app*'

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Config.



28
29
30
31
32
33
34
35
36
37
38
# File 'lib/paper_trail_scrapbook/config.rb', line 28

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

Instance Attribute Details

#drop_id_suffixObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



18
19
20
# File 'lib/paper_trail_scrapbook/config.rb', line 18

def drop_id_suffix
  @drop_id_suffix
end

#eventsObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



18
19
20
# File 'lib/paper_trail_scrapbook/config.rb', line 18

def events
  @events
end

#filter_non_changesObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



18
19
20
# File 'lib/paper_trail_scrapbook/config.rb', line 18

def filter_non_changes
  @filter_non_changes
end

#invalid_whodunnitObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



18
19
20
# File 'lib/paper_trail_scrapbook/config.rb', line 18

def invalid_whodunnit
  @invalid_whodunnit
end

#recent_firstObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



18
19
20
# File 'lib/paper_trail_scrapbook/config.rb', line 18

def recent_first
  @recent_first
end

#scrub_columnsObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



18
19
20
# File 'lib/paper_trail_scrapbook/config.rb', line 18

def scrub_columns
  @scrub_columns
end

#time_formatObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



18
19
20
# File 'lib/paper_trail_scrapbook/config.rb', line 18

def time_format
  @time_format
end

#unknown_whodunnitObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



18
19
20
# File 'lib/paper_trail_scrapbook/config.rb', line 18

def unknown_whodunnit
  @unknown_whodunnit
end

#whodunnit_classObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



18
19
20
# File 'lib/paper_trail_scrapbook/config.rb', line 18

def whodunnit_class
  @whodunnit_class
end