Class: DeviseSlackNotifiable::Configuration
- Inherits:
-
Object
- Object
- DeviseSlackNotifiable::Configuration
- Defined in:
- lib/devise_slack_notifiable/configuration.rb
Overview
Configuration container
Instance Attribute Summary collapse
-
#confirmation_message_enabled ⇒ Object
Returns the value of attribute confirmation_message_enabled.
-
#confirmation_message_formatter ⇒ Object
Returns the value of attribute confirmation_message_formatter.
-
#context_fields ⇒ Object
Returns the value of attribute context_fields.
-
#enabled ⇒ Object
Returns the value of attribute enabled.
-
#registration_message_formatter ⇒ Object
Returns the value of attribute registration_message_formatter.
-
#slack_webhook ⇒ Object
Returns the value of attribute slack_webhook.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
DeviseSlackNotifiable::Configuration constructor.
Constructor Details
#initialize ⇒ Configuration
DeviseSlackNotifiable::Configuration constructor.
Sets default values
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/devise_slack_notifiable/configuration.rb', line 16 def initialize @enabled = false @slack_webhook = nil @confirmation_message_enabled = true @context_fields = %i[id email] @registration_message_formatter = lambda { |entity| "Yeah 🎉! Looks like we have new #{entity.model_name.human}! 😊" } @confirmation_message_formatter = lambda { |entity| "#{entity.model_name.human} have just confirmed his account 🥂" } end |
Instance Attribute Details
#confirmation_message_enabled ⇒ Object
Returns the value of attribute confirmation_message_enabled.
6 7 8 |
# File 'lib/devise_slack_notifiable/configuration.rb', line 6 def @confirmation_message_enabled end |
#confirmation_message_formatter ⇒ Object
Returns the value of attribute confirmation_message_formatter.
6 7 8 |
# File 'lib/devise_slack_notifiable/configuration.rb', line 6 def @confirmation_message_formatter end |
#context_fields ⇒ Object
Returns the value of attribute context_fields.
6 7 8 |
# File 'lib/devise_slack_notifiable/configuration.rb', line 6 def context_fields @context_fields end |
#enabled ⇒ Object
Returns the value of attribute enabled.
6 7 8 |
# File 'lib/devise_slack_notifiable/configuration.rb', line 6 def enabled @enabled end |
#registration_message_formatter ⇒ Object
Returns the value of attribute registration_message_formatter.
6 7 8 |
# File 'lib/devise_slack_notifiable/configuration.rb', line 6 def @registration_message_formatter end |
#slack_webhook ⇒ Object
Returns the value of attribute slack_webhook.
6 7 8 |
# File 'lib/devise_slack_notifiable/configuration.rb', line 6 def slack_webhook @slack_webhook end |