Class: RTPush::SlackAdapter

Inherits:
BaseAdapter show all
Defined in:
lib/rtpush/adapters/slack_adapter.rb

Instance Attribute Summary

Attributes inherited from BaseAdapter

#errors

Class Method Summary collapse

Methods inherited from BaseAdapter

#exist?, #initialize, #valid?, validates_existence_of, validates_presence_of

Constructor Details

This class inherits a constructor from RTPush::BaseAdapter

Class Method Details

.push(message) ⇒ Object



4
5
6
7
8
9
# File 'lib/rtpush/adapters/slack_adapter.rb', line 4

def push(message)
  data = %(*#{ENV['NOTIFICATION_TITLE']}*\n`#{message}`)
  client.ping(data)
rescue StandardError => e
  raise Errors::AdapterError, e.message
end