Method: SlackNotification.say
- Defined in:
- lib/app/models/slack_notification.rb
.say(message, to: nil, from: nil, template: nil) ⇒ Object
Convenience method to say something when we see something
62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/app/models/slack_notification.rb', line 62 def self.say(, to: nil, from: nil, template: nil) notification = SlackNotification.new(to: to, from: from) notification. = if template.present? notification. template, elsif .is_a?(Array) .join("\n") else end notification.send_notification end |