Class: Failbot::HTTPBackend
- Inherits:
-
Object
- Object
- Failbot::HTTPBackend
- Defined in:
- lib/failbot/http_backend.rb
Instance Method Summary collapse
-
#initialize(url) ⇒ HTTPBackend
constructor
A new instance of HTTPBackend.
- #ping ⇒ Object
- #report(data) ⇒ Object
- #reports ⇒ Object
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
#ping ⇒ Object
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 |
#reports ⇒ Object
15 16 17 |
# File 'lib/failbot/http_backend.rb', line 15 def reports [] end |