Class: NSCA::Client::Notifier

Inherits:
Object
  • Object
show all
Defined in:
lib/nsca/client/notifier.rb

Instance Method Summary collapse

Constructor Details

#initialize(message) ⇒ Notifier

Returns a new instance of Notifier.



6
7
8
# File 'lib/nsca/client/notifier.rb', line 6

def initialize(message)
  @message = message
end

Instance Method Details

#send_nscaObject



10
11
12
13
14
# File 'lib/nsca/client/notifier.rb', line 10

def send_nsca
  connection = SendNsca::NscaConnection.new(@message.to_h)
  connection.send_nsca
  true
end