Class: PgCanary::Configuration
- Inherits:
-
Object
- Object
- PgCanary::Configuration
- Defined in:
- lib/pg_canary/configuration.rb
Instance Attribute Summary collapse
-
#app_root ⇒ Object
Returns the value of attribute app_root.
-
#enabled ⇒ Object
Returns the value of attribute enabled.
-
#ignore_tables ⇒ Object
Returns the value of attribute ignore_tables.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#rules ⇒ Object
readonly
Returns the value of attribute rules.
Instance Method Summary collapse
- #ignore_table?(table) ⇒ Boolean
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
8 9 10 11 12 13 14 |
# File 'lib/pg_canary/configuration.rb', line 8 def initialize @enabled = nil @ignore_tables = %w[schema_migrations ar_internal_metadata] @rules = RulesConfig.new @logger = nil @app_root = nil end |
Instance Attribute Details
#app_root ⇒ Object
Returns the value of attribute app_root.
5 6 7 |
# File 'lib/pg_canary/configuration.rb', line 5 def app_root @app_root end |
#enabled ⇒ Object
Returns the value of attribute enabled.
5 6 7 |
# File 'lib/pg_canary/configuration.rb', line 5 def enabled @enabled end |
#ignore_tables ⇒ Object
Returns the value of attribute ignore_tables.
5 6 7 |
# File 'lib/pg_canary/configuration.rb', line 5 def ignore_tables @ignore_tables end |
#logger ⇒ Object
Returns the value of attribute logger.
5 6 7 |
# File 'lib/pg_canary/configuration.rb', line 5 def logger @logger end |
#rules ⇒ Object (readonly)
Returns the value of attribute rules.
6 7 8 |
# File 'lib/pg_canary/configuration.rb', line 6 def rules @rules end |
Instance Method Details
#ignore_table?(table) ⇒ Boolean
16 17 18 |
# File 'lib/pg_canary/configuration.rb', line 16 def ignore_table?(table) table && ignore_tables.map(&:to_s).include?(table.to_s) end |