Class: UniformNotifier::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/uniform_notifier/base.rb

Class Method Summary collapse

Class Method Details

.active?Boolean

Returns:

  • (Boolean)


6
7
8
# File 'lib/uniform_notifier/base.rb', line 6

def active?
  false
end

.inline_notify(data) ⇒ Object



10
11
12
13
14
15
16
17
# File 'lib/uniform_notifier/base.rb', line 10

def inline_notify(data)
  return unless active?

  # For compatibility to the old protocol
  data = { title: data } if data.is_a?(String)

  _inline_notify(data)
end

.out_of_channel_notify(data) ⇒ Object



19
20
21
22
23
24
25
26
# File 'lib/uniform_notifier/base.rb', line 19

def out_of_channel_notify(data)
  return unless active?

  # For compatibility to the old protocol
  data = { title: data } if data.is_a?(String)

  _out_of_channel_notify(data)
end