Method: Bandshell::Interface#mac
- Defined in:
- lib/bandshell/netconfig.rb
#mac ⇒ Object
Get the physical (mac, ethernet) address of the interface.
55 56 57 58 59 |
# File 'lib/bandshell/netconfig.rb', line 55 def mac File.open("/sys/class/net/#{@name}/address") do |f| f.read.chomp end end |