Method: NetworkScanner::Scanner#get_cache_ips
- Defined in:
- lib/network_scanner.rb
#get_cache_ips(file) ⇒ Object
97 98 99 100 101 102 103 104 105 106 107 108 109 110 |
# File 'lib/network_scanner.rb', line 97 def get_cache_ips(file) @ips_to_check = [] if text? File.open(file).each_line do |ip| @ips_to_check << ip end elsif json? JSON.parse(File.read(file)).each do |ip| @ips_to_check << ip end end return @ips_to_check end |