Class: SlackErrorNotifier::SlackConfiguration

Inherits:
Object
  • Object
show all
Defined in:
lib/slack_error_notifier/slack_configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeSlackConfiguration

Returns a new instance of SlackConfiguration.



5
6
7
8
9
10
11
# File 'lib/slack_error_notifier/slack_configuration.rb', line 5

def initialize
  @slack_token = SlackErrorNotifier.access_token
  @target_channel = SlackErrorNotifier.target_channel
  configure_slack_client
  check_authentication
  check_target_channel_validity
end

Instance Attribute Details

#slack_tokenObject (readonly)

Returns the value of attribute slack_token.



3
4
5
# File 'lib/slack_error_notifier/slack_configuration.rb', line 3

def slack_token
  @slack_token
end

#target_channelObject (readonly)

Returns the value of attribute target_channel.



3
4
5
# File 'lib/slack_error_notifier/slack_configuration.rb', line 3

def target_channel
  @target_channel
end

Instance Method Details

#slack_clientObject



13
14
15
# File 'lib/slack_error_notifier/slack_configuration.rb', line 13

def slack_client
  @slack_client ||= Slack::Web::Client.new
end