Class: PgCanary::RuleConfig

Inherits:
Object
  • Object
show all
Defined in:
lib/pg_canary/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(option_defaults = {}) ⇒ RuleConfig

Returns a new instance of RuleConfig.



33
34
35
36
37
38
39
# File 'lib/pg_canary/configuration.rb', line 33

def initialize(option_defaults = {})
  @options = option_defaults.dup
  @options.each_key do |name|
    define_singleton_method(name) { @options[name] }
    define_singleton_method(:"#{name}=") { |value| @options[name] = value }
  end
end

Instance Attribute Details

#enabledObject

Returns the value of attribute enabled.



31
32
33
# File 'lib/pg_canary/configuration.rb', line 31

def enabled
  @enabled
end