Class: Miteru::Notifiers::Slack
- Defined in:
- lib/miteru/notifiers/slack.rb
Instance Method Summary collapse
-
#call(website) ⇒ Object
Notifiy to Slack.
- #callable? ⇒ Boolean
Methods inherited from Base
Methods inherited from Service
Instance Method Details
#call(website) ⇒ Object
Notifiy to Slack
82 83 84 85 86 87 |
# File 'lib/miteru/notifiers/slack.rb', line 82 def call(website) return unless callable? = SlackAttachment.new(website.url) notifier.post(text: website.info, attachments: .to_a) if website.kits? end |
#callable? ⇒ Boolean
89 90 91 |
# File 'lib/miteru/notifiers/slack.rb', line 89 def callable? !webhook_url.nil? end |