Module: RemoteCoffeeSlack

Defined in:
lib/remote_coffee_slack.rb,
lib/remote_coffee_slack/members.rb,
lib/remote_coffee_slack/version.rb,
lib/remote_coffee_slack/slack_client.rb,
lib/remote_coffee_slack/session_notifier.rb

Defined Under Namespace

Classes: Configuration, Members, SessionNotifier, SlackClient

Constant Summary collapse

VERSION =
"0.1.0"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.configObject

Returns the value of attribute config.



9
10
11
# File 'lib/remote_coffee_slack.rb', line 9

def config
  @config
end

.slack_clientObject

Returns the value of attribute slack_client.



10
11
12
# File 'lib/remote_coffee_slack.rb', line 10

def slack_client
  @slack_client
end

Class Method Details

.configure {|config| ... } ⇒ Object

Yields:



13
14
15
16
# File 'lib/remote_coffee_slack.rb', line 13

def self.configure
  self.config ||= Configuration.new
  yield config
end

.notify_next_sessionObject



26
27
28
# File 'lib/remote_coffee_slack.rb', line 26

def self.notify_next_session
  SessionNotifier.perform(slack_client, select_coffee_mates)
end

.select_coffee_matesObject



22
23
24
# File 'lib/remote_coffee_slack.rb', line 22

def self.select_coffee_mates
  @select_coffee_mates ||= Members.select_coffee_mates(slack_client)
end