Class: Kiba::Uncommon::Destinations::Slack
- Inherits:
-
Object
- Object
- Kiba::Uncommon::Destinations::Slack
- Defined in:
- lib/kiba/uncommon/destinations/slack.rb
Overview
Very basic Slack destination
Instance Attribute Summary collapse
-
#notifier ⇒ Object
readonly
Returns the value of attribute notifier.
Instance Method Summary collapse
- #close ⇒ Object
-
#initialize(slack_notifier) ⇒ Slack
constructor
A new instance of Slack.
- #write(row) ⇒ Object
Constructor Details
#initialize(slack_notifier) ⇒ Slack
Returns a new instance of Slack.
14 15 16 |
# File 'lib/kiba/uncommon/destinations/slack.rb', line 14 def initialize(slack_notifier) @notifier = slack_notifier end |
Instance Attribute Details
#notifier ⇒ Object (readonly)
Returns the value of attribute notifier.
11 12 13 |
# File 'lib/kiba/uncommon/destinations/slack.rb', line 11 def notifier @notifier end |
Instance Method Details
#close ⇒ Object
29 30 31 |
# File 'lib/kiba/uncommon/destinations/slack.rb', line 29 def close # Nothing to do end |
#write(row) ⇒ Object
19 20 21 22 23 24 25 26 |
# File 'lib/kiba/uncommon/destinations/slack.rb', line 19 def write(row) unless @headers_written @headers_written = true notifier.ping "`#{row.keys.join(',')}`" end notifier.ping row.values.join(',') end |