Class: StatusCat::Checkers::SendHub

Inherits:
Base
  • Object
show all
Defined in:
lib/status_cat/checkers/send_hub.rb

Constant Summary

Constants inherited from Base

Base::FORMAT

Instance Attribute Summary

Attributes inherited from Base

#status, #value

Instance Method Summary collapse

Methods inherited from Base

class_to_name, #name, #to_s

Constructor Details

#initializeSendHub

Returns a new instance of SendHub.



8
9
10
11
12
13
14
15
16
# File 'lib/status_cat/checkers/send_hub.rb', line 8

def initialize
  return if gem_missing?('ruby-sendhub', defined?(::SendHub))

  @value = number
  @status = fail_on_exception do
    send_hub = ::SendHub.new(api_key, number)
    send_hub.get_contacts ? nil : 'fail'
  end
end