Class: BubBot::Slack::Client
- Inherits:
-
Object
- Object
- BubBot::Slack::Client
- Includes:
- Singleton
- Defined in:
- lib/bub_bot/slack/client.rb
Overview
Just a simple wrapper around a slack connection. Call .instance on this, then call anything you’d normally call on a Slack Client on object on this instead. Eg ‘Client.instance.chat_postMessage`.
Instance Method Summary collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ Object
8 9 10 |
# File 'lib/bub_bot/slack/client.rb', line 8 def method_missing(method, *args, &block) client.respond_to?(method) ? client.public_send(method, *args, &block) : super end |
Instance Method Details
#client ⇒ Object
12 13 14 |
# File 'lib/bub_bot/slack/client.rb', line 12 def client @client ||= Slack::Web::Client.new(token: BubBot.configuration.bot_oauth_token) end |