Sha256: 8c4a458606e0fb3c88b466641da7fcab41c8b25a3c55645c47e46a61af62515f

Contents?: true

Size: 213 Bytes

Versions: 5

Compression:

Stored size: 213 Bytes

Contents

module LinuxStat
	module Net
		class << self
			def ipv4_private
				require 'socket'
				ip = Socket.ip_address_list.find(&:ipv4_private?)
				ip ? ip.ip? ? ip.ip_unpack[0].freeze : '' : ''
			end
		end
	end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
linux_stat-0.1.6 lib/linux_stat/net.rb
linux_stat-0.1.4 lib/linux_stat/net.rb
linux_stat-0.1.3 lib/linux_stat/net.rb
linux_stat-0.1.2 lib/linux_stat/net.rb
linux_stat-0.1.1 lib/linux_stat/net.rb