README.md in lan_scanner-0.0.2 vs README.md in lan_scanner-0.0.3

- old
+ new

@@ -18,11 +18,11 @@ <a name="usage"></a> ## Usage -### Find devices in LAN +### Find online devices in LAN ```ruby require 'lan_scanner' # examples with explicit default parameters devices = LanScanner.scan_devices network: '192.168.178.0/24' @@ -41,9 +41,24 @@ # end ``` +### Get state of devices in LAN + +```ruby +require 'lan_scanner' + +devices = LanScanner.scan_device_states %w[192.168.178.1 192.168.178.22 192.168.178.44] +# => [LanScanner::Device, LanScanner::Device, ...] + +devices.each do |d| + puts "#{d.remote_address} -> #{d.host_name} (#{d.state})" +end +# 192.168.178.1 -> server.domain (up) +# 192.168.178.22 -> mycomputer.domain (up) +# 192.168.178.44 -> (down) +``` <a name="installation"></a> ## Installation ### NMAP