Method: OkComputer::PingCheck#initialize
- Defined in:
- lib/ok_computer/built_in_checks/ping_check.rb
#initialize(host, port, request_timeout = 5) ⇒ PingCheck
Public: Initialize a new ping check.
host - the hostname port - the port, as a string request_timeout - How long to wait to connect before timing out. Defaults to 5 seconds.
14 15 16 17 18 19 |
# File 'lib/ok_computer/built_in_checks/ping_check.rb', line 14 def initialize(host, port, request_timeout = 5) raise ArgumentError if host.blank? || port.blank? self.host = host self.port = port self.request_timeout = request_timeout.to_i end |