Class: PaperTrailScrapbook::Config Private
- Inherits:
-
Object
- Object
- PaperTrailScrapbook::Config
- 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
- #drop_id_suffix ⇒ Object private
- #events ⇒ Object private
- #filter_non_changes ⇒ Object private
- #invalid_whodunnit ⇒ Object private
- #recent_first ⇒ Object private
- #scrub_columns ⇒ Object private
- #time_format ⇒ Object private
- #unknown_whodunnit ⇒ Object private
- #whodunnit_class ⇒ Object private
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
private
A new instance of Config.
Constructor Details
#initialize ⇒ Config
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_suffix ⇒ Object
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 |
#events ⇒ Object
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_changes ⇒ Object
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_whodunnit ⇒ Object
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_first ⇒ Object
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_columns ⇒ Object
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_format ⇒ Object
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_whodunnit ⇒ Object
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_class ⇒ Object
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 |