What will be the alternate of win32api for Linux?
<p>I have a Ruby code for a site response. To check if the site is UP Or Down. But it works only for windows.If i want to use it for Ubuntu what will be the change ? I am trying to run this but win32api line getting an error on Ubuntu. </p>

<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>require "net/https"
require "uri"
require "Win32API"
uri = URI.parse("https://address ")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(uri.request_uri)
response = http.request(request)
test = response.body
delay = 10
message = "Site is OK"
title = "Up"
api = Win32API.new('user32', 'MessageBox',['L', 'P', 'P', 'L'],'I')
until !test.include? "false"
time = Time.now.strftime("%d/%m/%Y %H:%M")
puts time
puts "Down"
response = http.request(request)
test = response.body
sleep(delay)
end
api.call(0,message,title,0)
until test.include? "false"
api.call(0,message,title,0)
time = Time.now.strftime("%d/%m/%Y %H:%M")
puts time
puts "Up"
response = http.request(request)
test = response.body
sleep(delay)
end</code></pre>
</div>
</div>
</p>