Class: Y2Network::HardwareWrapper

Inherits:
Object
  • Object
show all
Defined in:
src/lib/y2network/hwinfo.rb

Overview

A helper for Hwinfo.

Instance Method Summary collapse

Constructor Details

#initializeHardwareWrapper


27
28
29
# File 'src/lib/y2network/hwinfo.rb', line 27

def initialize
  Yast.include self, "network/routines.rb"
end

Instance Method Details

#netcardsArray<Hwinfo>

Returns the network devices hardware information


34
35
36
37
38
39
40
41
42
# File 'src/lib/y2network/hwinfo.rb', line 34

def netcards
  return @netcards if @netcards
  read_hardware
  @netcards = ReadHardware("netcard").map do |attrs|
    name = attrs["dev_name"]
    extra_attrs = name ? extra_attrs_for(name) : {}
    Hwinfo.new(attrs.merge(extra_attrs))
  end
end