Class: Naminori::Notifier::Slack
- Defined in:
- lib/naminori/notifier/slack.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from Naminori::Notifier::Base
Instance Method Details
#notifier(type, message) ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/naminori/notifier/slack.rb', line 5 def notifier(type, ) icon = type == "add" ? ":white_check_mark:" : ":no_entry_sign:" notifier = ::Slack::Notifier.new(config.webhook_url, { channel: config.channel, username: config.user}) notifier.ping icon + Time.new.strftime("%H:%M:%S ") + , icon_emoji: ":sparkle:" rescue => e p e end |