Method: Inspec::Resources::WMI#initialize

Defined in:
lib/resources/wmi.rb

#initialize(wmiclass, opts = {}) ⇒ WMI

Returns a new instance of WMI.



27
28
29
30
31
32
33
34
# File 'lib/resources/wmi.rb', line 27

def initialize(wmiclass, opts = {})
  # verify that this resource is only supported on Windows
  return skip_resource 'The `windows_feature` resource is not supported on your OS.' unless inspec.os.windows?

  @wmiclass = wmiclass
  @wminamespace = opts[:namespace]
  @wmifilter = opts[:filter]
end