Class: Comana::HostInspector::Ping
- Inherits:
-
Object
- Object
- Comana::HostInspector::Ping
- Defined in:
- lib/comana/hostinspector/ping.rb
Constant Summary collapse
- PING_MIN_INTERVAL =
1
Instance Method Summary collapse
-
#alive? ⇒ Boolean
Return true if ping respond from the host.
-
#initialize(hostname) ⇒ Ping
constructor
A new instance of Ping.
Constructor Details
#initialize(hostname) ⇒ Ping
Returns a new instance of Ping.
11 12 13 14 |
# File 'lib/comana/hostinspector/ping.rb', line 11 def initialize(hostname) @hostname = hostname @alive = ping end |
Instance Method Details
#alive? ⇒ Boolean
Return true if ping respond from the host. Return false if no ping respond from the host.
18 19 20 |
# File 'lib/comana/hostinspector/ping.rb', line 18 def alive? @alive end |