Class: Miteru::Notifiers::Base

Inherits:
Service
  • Object
show all
Defined in:
lib/miteru/notifiers/base.rb

Direct Known Subclasses

Slack, UrlScan

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Service

call, #result, result

Class Method Details

.inherited(child) ⇒ Object



19
20
21
22
# File 'lib/miteru/notifiers/base.rb', line 19

def inherited(child)
  super
  Miteru.notifiers << child
end

Instance Method Details

#call(kit) ⇒ Object

Raises:

  • (NotImplementedError)


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

def call(kit)
  raise NotImplementedError
end

#callable?Boolean

Returns:

  • (Boolean)

Raises:

  • (NotImplementedError)


10
11
12
# File 'lib/miteru/notifiers/base.rb', line 10

def callable?
  raise NotImplementedError
end

#nameObject



14
15
16
# File 'lib/miteru/notifiers/base.rb', line 14

def name
  @name ||= self.class.to_s.split("::").last
end