Class: Inspec::Resources::LegacyPowershellScript

Inherits:
PowershellScript show all
Defined in:
lib/resources/powershell.rb

Overview

this is deprecated syntax and will be removed in future versions

Instance Attribute Summary

Attributes inherited from Cmd

#command

Instance Method Summary collapse

Methods inherited from PowershellScript

#exist?, #strip, #to_s

Methods inherited from Cmd

#exist?, #exit_status, #result, #stderr, #stdout, #to_s

Constructor Details

#initialize(script) ⇒ LegacyPowershellScript

Returns a new instance of LegacyPowershellScript.



58
59
60
61
# File 'lib/resources/powershell.rb', line 58

def initialize(script)
  deprecated
  super(script)
end

Instance Method Details

#deprecatedObject



63
64
65
# File 'lib/resources/powershell.rb', line 63

def deprecated
  warn '[DEPRECATION] `script(script)` is deprecated.  Please use `powershell(script)` instead.'
end