Class: Samsung::Network
- Inherits:
-
Object
- Object
- Samsung::Network
- Defined in:
- lib/samsung/network.rb
Instance Method Summary collapse
Instance Method Details
#local_hw_address ⇒ Object
7 8 9 |
# File 'lib/samsung/network.rb', line 7 def local_hw_address `ifconfig -a | grep HWaddr | cut -c39- | head -n1`.strip end |
#local_ip ⇒ Object
3 4 5 |
# 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 |