Class: NineOneOne::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/nine_one_one/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



9
10
11
12
13
# File 'lib/nine_one_one/configuration.rb', line 9

def initialize
  self.send_pagers = false
  self.slack_enabled = false
  self.logger = Logger.new(STDOUT)
end

Instance Attribute Details

#loggerObject

Returns the value of attribute logger.



5
6
7
# File 'lib/nine_one_one/configuration.rb', line 5

def logger
  @logger
end

#pager_duty_integration_keyObject

Returns the value of attribute pager_duty_integration_key.



5
6
7
# File 'lib/nine_one_one/configuration.rb', line 5

def pager_duty_integration_key
  @pager_duty_integration_key
end

#send_pagersObject

Returns the value of attribute send_pagers.



5
6
7
# File 'lib/nine_one_one/configuration.rb', line 5

def send_pagers
  @send_pagers
end

#slack_channelObject

Returns the value of attribute slack_channel.



5
6
7
# File 'lib/nine_one_one/configuration.rb', line 5

def slack_channel
  @slack_channel
end

#slack_enabledObject

Returns the value of attribute slack_enabled.



5
6
7
# File 'lib/nine_one_one/configuration.rb', line 5

def slack_enabled
  @slack_enabled
end

#slack_usernameObject

Returns the value of attribute slack_username.



5
6
7
# File 'lib/nine_one_one/configuration.rb', line 5

def slack_username
  @slack_username
end

#slack_webhook_urlObject

Returns the value of attribute slack_webhook_url.



5
6
7
# File 'lib/nine_one_one/configuration.rb', line 5

def slack_webhook_url
  @slack_webhook_url
end

Instance Method Details

#validateObject



15
16
17
18
19
20
21
# File 'lib/nine_one_one/configuration.rb', line 15

def validate
  validate_send_pagers
  validate_logger
  validate_pager_duty_key
  validate_slack_enabled
  validate_slack_opts
end