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.



4
5
6
7
8
9
10
# File 'lib/status_cat/checkers/send_hub.rb', line 4

def initialize
  @value = ENV[ 'SEND_HUB_NUMBER' ]
  @status = fail_on_exception do
    send_hub = ::SendHub.new( ENV[ 'SEND_HUB_API_KEY' ], ENV[ 'SEND_HUB_NUMBER' ] )
    send_hub.get_contacts ? nil : 'fail'
  end
end