Class: CampusIvy::Resources::Health

Inherits:
Object
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/campus_ivy/resources/health.rb

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Health

Returns a new instance of Health.



9
10
11
# File 'lib/campus_ivy/resources/health.rb', line 9

def initialize(client)
  @client = client
end

Instance Method Details

#check ⇒ Object



14
15
16
17
# File 'lib/campus_ivy/resources/health.rb', line 14

def check
  response = @client.connection.get('health/check')
  CampusIvy::Object.new(response.body)
end

#ping ⇒ Object



20
21
22
23
24
# File 'lib/campus_ivy/resources/health.rb', line 20

def ping
  # Ping returns plain string "Pong"
  response = @client.connection.get('health/ping')
  response.body.to_s
end