Class: PgCanary::RuleConfig
- Inherits:
-
Object
- Object
- PgCanary::RuleConfig
- Defined in:
- lib/pg_canary/configuration.rb
Instance Attribute Summary collapse
-
#enabled ⇒ Object
Returns the value of attribute enabled.
Instance Method Summary collapse
-
#initialize(option_defaults = {}) ⇒ RuleConfig
constructor
A new instance of RuleConfig.
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
#enabled ⇒ Object
Returns the value of attribute enabled.
31 32 33 |
# File 'lib/pg_canary/configuration.rb', line 31 def enabled @enabled end |