Class: RemoteCoffeeSlack::SessionNotifier

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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client, coffee_mates) ⇒ SessionNotifier

Returns a new instance of SessionNotifier.



3
4
5
6
# File 'lib/remote_coffee_slack/session_notifier.rb', line 3

def initialize(client, coffee_mates)
  @client = client
  @coffee_mates = coffee_mates
end

Class Method Details

.perform(client, coffee_mates) ⇒ Object



15
16
17
# File 'lib/remote_coffee_slack/session_notifier.rb', line 15

def self.perform(client, coffee_mates)
  new(client, coffee_mates).perform
end

Instance Method Details

#performObject



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

def perform
  client.chat_postMessage(
    channel: RemoteCoffeeSlack.config.slack_channel,
    text: next_session_message,
    as_user: true)
end