Class: Facts::Windows::Scope6Interfaces

Inherits:
Object
  • Object
show all
Defined in:
lib/facter/facts/windows/scope6_interfaces.rb

Constant Summary collapse

FACT_NAME =
'scope6_.*'
TYPE =
:legacy

Instance Method Summary collapse

Instance Method Details

#call_the_resolverObject



9
10
11
12
13
14
15
16
17
# File 'lib/facter/facts/windows/scope6_interfaces.rb', line 9

def call_the_resolver
  arr = []
  result = {}
  interfaces = Facter::Resolvers::Windows::Networking.resolve(:interfaces)
  interfaces&.each { |interface_name, info| result["scope6_#{interface_name}"] = info[:scope6] if info[:scope6] }

  result.each { |fact, value| arr << Facter::ResolvedFact.new(fact, value, :legacy) }
  arr
end