Facter::Util::Macaddress::Windows

Public Class Methods

macaddress() click to toggle source
    # File lib/facter/util/macaddress.rb, line 35
35:     def macaddress
36:       require 'facter/util/wmi'
37: 
38:       query = "select MACAddress from Win32_NetworkAdapterConfiguration where IPEnabled = True"
39: 
40:       ether = nil
41:       Facter::Util::WMI.execquery(query).each do |nic|
42:         ether = nic.MacAddress
43:         break
44:       end
45:       ether
46:     end

Private Instance Methods

macaddress() click to toggle source
    # File lib/facter/util/macaddress.rb, line 35
35:     def macaddress
36:       require 'facter/util/wmi'
37: 
38:       query = "select MACAddress from Win32_NetworkAdapterConfiguration where IPEnabled = True"
39: 
40:       ether = nil
41:       Facter::Util::WMI.execquery(query).each do |nic|
42:         ether = nic.MacAddress
43:         break
44:       end
45:       ether
46:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.