Class: WinNet::Bindings4
- Inherits:
-
Object
- Object
- WinNet::Bindings4
- Defined in:
- lib/vmopt/windows/win_net.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.
203 204 205 |
# File 'lib/vmopt/windows/win_net.rb', line 203 def initialize @key = 'SYSTEM\CurrentControlSet\Services\Tcpip\Linkage' end |
Instance Method Details
#bindings ⇒ Object
207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 |
# File 'lib/vmopt/windows/win_net.rb', line 207 def bindings require 'vmopt/utils/registry' bindings = {} 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 |