Class: Facter::Util::IP::Windows::Bindings4
- Inherits:
-
Object
- Object
- Facter::Util::IP::Windows::Bindings4
- Defined in:
- lib/facter/util/ip/windows.rb
Direct Known Subclasses
Instance Method Summary collapse
- #bindings ⇒ Object
-
#initialize ⇒ Bindings4
constructor
A new instance of Bindings4.
Constructor Details
#initialize ⇒ Bindings4
Returns a new instance of Bindings4.
153 154 155 |
# File 'lib/facter/util/ip/windows.rb', line 153 def initialize @key = 'SYSTEM\CurrentControlSet\Services\Tcpip\Linkage' end |
Instance Method Details
#bindings ⇒ Object
157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 |
# File 'lib/facter/util/ip/windows.rb', line 157 def bindings require 'facter/util/registry' bindings = {} Facter::Util::Registry.hklm_read(@key, 'Bind').each_with_index do |entry, index| match_data = entry.match(/\\Device\\(\{.*\})/) unless match_data.nil? bindings[match_data[1]] = index end end bindings rescue {} end |