Module: Configuration
- Included in:
- SlackErrorNotifier
- Defined in:
- lib/slack_error_notifier/helpers/configuration.rb
Instance Method Summary collapse
Instance Method Details
#configuration {|_self| ... } ⇒ Object
2 3 4 |
# File 'lib/slack_error_notifier/helpers/configuration.rb', line 2 def configuration yield self end |
#define_setting(name, default = nil) ⇒ Object
5 6 7 8 9 10 11 12 13 |
# File 'lib/slack_error_notifier/helpers/configuration.rb', line 5 def define_setting(name, default = nil) class_variable_set("@@#{name}", default) define_class_method "#{name}=" do |value| class_variable_set("@@#{name}", value) end define_class_method name do class_variable_get("@@#{name}") end end |