class Eye::Notify::Hipchat
Constants
- VERSION
Public Instance Methods
execute()
click to toggle source
# File lib/eye/notify/hipchat.rb, line 31 def execute say(parse_message) end
Private Instance Methods
client()
click to toggle source
# File lib/eye/notify/hipchat.rb, line 49 def client HipChat::Client.new(token, api_version: api) end
msg_time()
click to toggle source
# File lib/eye/notify/hipchat.rb, line 45 def msg_time Eye::Utils.human_time2(msg_at) end
parse_message()
click to toggle source
# File lib/eye/notify/hipchat.rb, line 37 def parse_message filled_message = message.dup %w{time host message name full_name pid level}.each do |variable| filled_message.gsub!("##{variable}#", send("msg_#{variable}").to_s) if filled_message =~ /##{variable}#/ end filled_message end
say(what)
click to toggle source
# File lib/eye/notify/hipchat.rb, line 53 def say(what) client[contact].send(name, what, message_format: format, color: color, notify: notify_all) end