Class: StatusCat::Checkers::Profilesio

Inherits:
Base
  • Object
show all
Defined in:
lib/status_cat/checkers/profilesio.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

#initializeProfilesio

Returns a new instance of Profilesio.



7
8
9
10
11
12
13
# File 'lib/status_cat/checkers/profilesio.rb', line 7

def initialize
  @value = api_key
  @status = fail_on_exception do
    response = ::HTTParty.get('https://profiles.io/record/register')
    response.code == 200 ? nil : 'fail'
  end
end