Class: Newshound::Configuration
- Inherits:
-
Object
- Object
- Newshound::Configuration
- Defined in:
- lib/newshound/configuration.rb
Instance Attribute Summary collapse
-
#aws_access_key_id ⇒ Object
Returns the value of attribute aws_access_key_id.
-
#aws_region ⇒ Object
Returns the value of attribute aws_region.
-
#aws_secret_access_key ⇒ Object
Returns the value of attribute aws_secret_access_key.
-
#enabled ⇒ Object
Returns the value of attribute enabled.
-
#exception_limit ⇒ Object
Returns the value of attribute exception_limit.
-
#report_time ⇒ Object
Returns the value of attribute report_time.
-
#slack_channel ⇒ Object
Returns the value of attribute slack_channel.
-
#slack_webhook_url ⇒ Object
Returns the value of attribute slack_webhook_url.
-
#sns_topic_arn ⇒ Object
Returns the value of attribute sns_topic_arn.
-
#time_zone ⇒ Object
Returns the value of attribute time_zone.
-
#transport_adapter ⇒ Object
Returns the value of attribute transport_adapter.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #valid? ⇒ Boolean
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/newshound/configuration.rb', line 10 def initialize @slack_webhook_url = nil @slack_channel = "#general" @report_time = "09:00" @exception_limit = 4 @time_zone = "America/New_York" @enabled = true @transport_adapter = :slack @sns_topic_arn = nil @aws_region = nil @aws_access_key_id = nil @aws_secret_access_key = nil end |
Instance Attribute Details
#aws_access_key_id ⇒ Object
Returns the value of attribute aws_access_key_id.
5 6 7 |
# File 'lib/newshound/configuration.rb', line 5 def aws_access_key_id @aws_access_key_id end |
#aws_region ⇒ Object
Returns the value of attribute aws_region.
5 6 7 |
# File 'lib/newshound/configuration.rb', line 5 def aws_region @aws_region end |
#aws_secret_access_key ⇒ Object
Returns the value of attribute aws_secret_access_key.
5 6 7 |
# File 'lib/newshound/configuration.rb', line 5 def aws_secret_access_key @aws_secret_access_key end |
#enabled ⇒ Object
Returns the value of attribute enabled.
5 6 7 |
# File 'lib/newshound/configuration.rb', line 5 def enabled @enabled end |
#exception_limit ⇒ Object
Returns the value of attribute exception_limit.
5 6 7 |
# File 'lib/newshound/configuration.rb', line 5 def exception_limit @exception_limit end |
#report_time ⇒ Object
Returns the value of attribute report_time.
5 6 7 |
# File 'lib/newshound/configuration.rb', line 5 def report_time @report_time end |
#slack_channel ⇒ Object
Returns the value of attribute slack_channel.
5 6 7 |
# File 'lib/newshound/configuration.rb', line 5 def slack_channel @slack_channel end |
#slack_webhook_url ⇒ Object
Returns the value of attribute slack_webhook_url.
5 6 7 |
# File 'lib/newshound/configuration.rb', line 5 def slack_webhook_url @slack_webhook_url end |
#sns_topic_arn ⇒ Object
Returns the value of attribute sns_topic_arn.
5 6 7 |
# File 'lib/newshound/configuration.rb', line 5 def sns_topic_arn @sns_topic_arn end |
#time_zone ⇒ Object
Returns the value of attribute time_zone.
5 6 7 |
# File 'lib/newshound/configuration.rb', line 5 def time_zone @time_zone end |
#transport_adapter ⇒ Object
Returns the value of attribute transport_adapter.
5 6 7 |
# File 'lib/newshound/configuration.rb', line 5 def transport_adapter @transport_adapter end |
Instance Method Details
#valid? ⇒ Boolean
24 25 26 27 28 29 |
# File 'lib/newshound/configuration.rb', line 24 def valid? return false unless enabled return false if slack_webhook_url.nil? || slack_webhook_url.empty? true end |