Method: Inspec::Resources::Host#reachable?
- Defined in:
- lib/resources/host.rb
#reachable?(port = nil, proto = nil, timeout = nil) ⇒ Boolean
58 59 60 61 |
# File 'lib/resources/host.rb', line 58 def reachable?(port = nil, proto = nil, timeout = nil) fail "Use `host` resource with host('#{@hostname}', port: #{port}, proto: '#{proto}') parameters." if !port.nil? || !proto.nil? || !timeout.nil? ping.nil? ? false : ping end |