Class: Inspec::Resources::Ksh

Inherits:
Cmd
  • Object
show all
Defined in:
lib/resources/ksh.rb

Instance Attribute Summary

Attributes inherited from Cmd

#command

Instance Method Summary collapse

Methods inherited from Cmd

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

Constructor Details

#initialize(command, options = {}) ⇒ Ksh

Returns a new instance of Ksh.



25
26
27
28
29
# File 'lib/resources/ksh.rb', line 25

def initialize(command, options = {})
  @raw_command = command
  options[:shell] = 'ksh' if options.is_a?(Hash)
  super(CommandWrapper.wrap(command, options))
end

Instance Method Details

#to_sObject



31
32
33
# File 'lib/resources/ksh.rb', line 31

def to_s
  "KornShell command #{@raw_command}"
end