Class: Slackify::Configuration
- Inherits:
-
Object
- Object
- Slackify::Configuration
- Defined in:
- lib/slackify/configuration.rb
Overview
Where the configuration for Slackify lives
Instance Attribute Summary collapse
-
#approved_bot_ids ⇒ Object
Returns the value of attribute approved_bot_ids.
-
#custom_event_type_handlers ⇒ Object
Returns the value of attribute custom_event_type_handlers.
-
#custom_message_subtype_handlers ⇒ Object
Returns the value of attribute custom_message_subtype_handlers.
-
#handlers ⇒ Object
Returns the value of attribute handlers.
-
#slack_bot_token ⇒ Object
Returns the value of attribute slack_bot_token.
-
#slack_client ⇒ Object
Returns the value of attribute slack_client.
-
#slack_secret_token ⇒ Object
Returns the value of attribute slack_secret_token.
-
#unhandled_handler ⇒ Object
Returns the value of attribute unhandled_handler.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
-
#remove_unhandled_handler ⇒ Object
Remove unhandled handler.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/slackify/configuration.rb', line 11 def initialize @slack_bot_token = nil @slack_secret_token = nil @handlers = generate_handlers @slack_client = nil @custom_message_subtype_handlers = {} @custom_event_type_handlers = {} @unhandled_handler = Handlers::UnhandledHandler @approved_bot_ids = [] end |
Instance Attribute Details
#approved_bot_ids ⇒ Object
Returns the value of attribute approved_bot_ids.
9 10 11 |
# File 'lib/slackify/configuration.rb', line 9 def approved_bot_ids @approved_bot_ids end |
#custom_event_type_handlers ⇒ Object
Returns the value of attribute custom_event_type_handlers.
8 9 10 |
# File 'lib/slackify/configuration.rb', line 8 def custom_event_type_handlers @custom_event_type_handlers end |
#custom_message_subtype_handlers ⇒ Object
Returns the value of attribute custom_message_subtype_handlers.
8 9 10 |
# File 'lib/slackify/configuration.rb', line 8 def @custom_message_subtype_handlers end |
#handlers ⇒ Object
Returns the value of attribute handlers.
9 10 11 |
# File 'lib/slackify/configuration.rb', line 9 def handlers @handlers end |
#slack_bot_token ⇒ Object
Returns the value of attribute slack_bot_token.
8 9 10 |
# File 'lib/slackify/configuration.rb', line 8 def slack_bot_token @slack_bot_token end |
#slack_client ⇒ Object
Returns the value of attribute slack_client.
9 10 11 |
# File 'lib/slackify/configuration.rb', line 9 def slack_client @slack_client end |
#slack_secret_token ⇒ Object
Returns the value of attribute slack_secret_token.
9 10 11 |
# File 'lib/slackify/configuration.rb', line 9 def slack_secret_token @slack_secret_token end |
#unhandled_handler ⇒ Object
Returns the value of attribute unhandled_handler.
8 9 10 |
# File 'lib/slackify/configuration.rb', line 8 def unhandled_handler @unhandled_handler end |
Instance Method Details
#remove_unhandled_handler ⇒ Object
Remove unhandled handler. The bot will not reply if the message doesn’t match any regex
32 33 34 |
# File 'lib/slackify/configuration.rb', line 32 def remove_unhandled_handler @unhandled_handler = nil end |