class Samsung::Network
Public Instance Methods
local_hw_address()
click to toggle source
# File lib/samsung/network.rb, line 7 def local_hw_address `ifconfig -a | grep HWaddr | cut -c39- | head -n1`.strip end
local_ip()
click to toggle source
# File lib/samsung/network.rb, line 3 def local_ip Socket.ip_address_list.find {|a| a.ipv4? and !a.ipv4_loopback? and a.ipv4_private? }.ip_address end