Class: ZombieCheck::Ping::NetPing
- Inherits:
-
PingSender
- Object
- PingSender
- ZombieCheck::Ping::NetPing
- Defined in:
- lib/zombie_check/ping/ping_sender/net_ping.rb
Instance Attribute Summary
Attributes inherited from PingSender
Instance Method Summary collapse
-
#initialize(host) ⇒ NetPing
constructor
A new instance of NetPing.
- #send ⇒ Object
Constructor Details
#initialize(host) ⇒ NetPing
Returns a new instance of NetPing.
5 6 7 |
# File 'lib/zombie_check/ping/ping_sender/net_ping.rb', line 5 def initialize(host) super host end |
Instance Method Details
#send ⇒ Object
9 10 11 12 13 14 |
# File 'lib/zombie_check/ping/ping_sender/net_ping.rb', line 9 def send icmp = Net::Ping::ICMP.new(host) icmp.ping self.duration = icmp.duration self end |