Method: Bandshell::WiredConnection.interfaces
- Defined in:
- lib/bandshell/netconfig.rb
.interfaces ⇒ Object
Try to find all wired interfaces on the system.
210 211 212 213 214 |
# File 'lib/bandshell/netconfig.rb', line 210 def self.interfaces # This is somewhat Linux specific and may miss some oddballs. devices = Dir.glob('/sys/class/net/eth*') devices.map { |d| Interface.new(File.basename(d)) } end |