Class: Naminori::Notifier
- Inherits:
-
Object
- Object
- Naminori::Notifier
show all
- Defined in:
- lib/naminori/notifier.rb,
lib/naminori/notifier/base.rb,
lib/naminori/notifier/slack.rb,
lib/naminori/notifier/configure.rb
Defined Under Namespace
Classes: Base, Configure, Slack
Class Method Summary
collapse
Class Method Details
.get_notifier(notifier) ⇒ Object
13
14
15
16
17
18
|
# File 'lib/naminori/notifier.rb', line 13
def get_notifier(notifier)
case notifier
when "slack"
Naminori::Notifier::Slack.new
end
end
|
.notifier(type, message) ⇒ Object
5
6
7
8
9
10
11
|
# File 'lib/naminori/notifier.rb', line 5
def notifier(type, message)
config = Naminori::Notifier::Configure.instance
case
when config.webhook_url && config.user && config.channel
get_notifier("slack").notifier(type, message)
end
end
|