Method: Inspec::Resources::Cmd#to_s

Defined in:
lib/inspec/resources/command.rb

#to_sObject



81
82
83
84
85
86
87
# File 'lib/inspec/resources/command.rb', line 81

def to_s
  output = "Command: `#{@command}`"
  # Redact output if the `redact_regex` option is passed
  # If no capture groups are passed then `\1` and `\2` are ignored
  output.gsub!(@redact_regex, '\1REDACTED\2') unless @redact_regex.nil?
  output
end