Class: Failbot::HTTPBackend

Inherits:
Object
  • Object
show all
Defined in:
lib/failbot/http_backend.rb

Instance Method Summary collapse

Constructor Details

#initialize(url) ⇒ HTTPBackend

Returns a new instance of HTTPBackend.



3
4
5
6
7
8
9
# File 'lib/failbot/http_backend.rb', line 3

def initialize(url)
  if url.to_s.empty?
    raise ArgumentError, "FAILBOT_HAYSTACK_URL setting required."
  end

  @haystack = Failbot::Haystack.new(url)
end

Instance Method Details

#pingObject



19
20
21
# File 'lib/failbot/http_backend.rb', line 19

def ping
  @haystack.ping
end

#report(data) ⇒ Object



11
12
13
# File 'lib/failbot/http_backend.rb', line 11

def report(data)
  @haystack.send_data(data)
end

#reportsObject



15
16
17
# File 'lib/failbot/http_backend.rb', line 15

def reports
  []
end