Module: Konsierge::Notifier

Defined in:
lib/konsierge/notifier.rb,
lib/konsierge/notifier/version.rb,
lib/konsierge/notifier/configuration.rb,
lib/konsierge/notifier/adapters/telegram.rb,
lib/konsierge/notifier/adapters/base_adapter.rb,
lib/konsierge/notifier/rails_report_subscriber.rb

Defined Under Namespace

Modules: Adapters Classes: Configuration, RailsReportSubscriber

Constant Summary collapse

VERSION =
'0.1.6'

Class Method Summary collapse

Class Method Details

.adapter_instanceObject



24
25
26
# File 'lib/konsierge/notifier.rb', line 24

def adapter_instance
  @adapter_instance ||= config.adapter_class.new
end

.configObject



14
15
16
# File 'lib/konsierge/notifier.rb', line 14

def config
  @config ||= Configuration.new
end

.configure {|config| ... } ⇒ Object

Yields:



18
19
20
21
22
# File 'lib/konsierge/notifier.rb', line 18

def configure
  subscribe_on_reporter

  yield(config)
end

.send_errorObject Also known as: report_error



32
33
34
# File 'lib/konsierge/notifier.rb', line 32

def send_error(...)
  adapter_instance.send_error(...)
end

.send_messageObject



28
29
30
# File 'lib/konsierge/notifier.rb', line 28

def send_message(...)
  adapter_instance.send_message(...)
end