Class: RemoteCoffeeSlack::SlackClient

Inherits:
Object
  • Object
show all
Defined in:
lib/remote_coffee_slack/slack_client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeSlackClient

Returns a new instance of SlackClient.



7
8
9
10
11
12
13
14
# File 'lib/remote_coffee_slack/slack_client.rb', line 7

def initialize
  ::Slack.configure do |config|
    config.token = RemoteCoffeeSlack.config.slack_bot_token
    raise 'Missing API token' unless config.token
  end

  @client = Slack::Web::Client.new
end

Instance Attribute Details

#clientObject (readonly)

Returns the value of attribute client.



5
6
7
# File 'lib/remote_coffee_slack/slack_client.rb', line 5

def client
  @client
end