Class: Rack::ErrorToSlack::Configuration
- Inherits:
-
Object
- Object
- Rack::ErrorToSlack::Configuration
- Defined in:
- lib/rack/error_to_slack/configuration.rb
Overview
Configuration Class
Instance Attribute Summary collapse
-
#branch ⇒ Object
readonly
Returns the value of attribute branch.
-
#emoji ⇒ Object
Returns the value of attribute emoji.
-
#slackname ⇒ Object
Returns the value of attribute slackname.
-
#username ⇒ Object
readonly
Returns the value of attribute username.
-
#webhook_url ⇒ Object
Returns the value of attribute webhook_url.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
11 12 13 14 15 16 17 |
# File 'lib/rack/error_to_slack/configuration.rb', line 11 def initialize @webhook_url = nil @emoji = ':innocent:' @slackname = 'ErrorToSlack' @branch = `git rev-parse --abbrev-ref HEAD`.chomp || 'SOME BRANCH' @username = `whoami`.chomp || 'Anonymous' end |
Instance Attribute Details
#branch ⇒ Object (readonly)
Returns the value of attribute branch.
8 9 10 |
# File 'lib/rack/error_to_slack/configuration.rb', line 8 def branch @branch end |
#emoji ⇒ Object
Returns the value of attribute emoji.
6 7 8 |
# File 'lib/rack/error_to_slack/configuration.rb', line 6 def emoji @emoji end |
#slackname ⇒ Object
Returns the value of attribute slackname.
7 8 9 |
# File 'lib/rack/error_to_slack/configuration.rb', line 7 def slackname @slackname end |
#username ⇒ Object (readonly)
Returns the value of attribute username.
9 10 11 |
# File 'lib/rack/error_to_slack/configuration.rb', line 9 def username @username end |
#webhook_url ⇒ Object
Returns the value of attribute webhook_url.
5 6 7 |
# File 'lib/rack/error_to_slack/configuration.rb', line 5 def webhook_url @webhook_url end |