Class: WinRM::WSMV::CommandOutputDecoder

Inherits:
Object
  • Object
show all
Defined in:
lib/winrm/wsmv/command_output_decoder.rb

Overview

Handles decoding a raw output response

Instance Method Summary collapse

Instance Method Details

#decode(raw_output) ⇒ String

Decode the raw SOAP output into decoded and human consumable text, Decodes and replaces invalid unicode characters.

Parameters:

  • raw_output (String)

    The raw encoded output

Returns:

  • (String)

    The decoded output



25
26
27
28
29
30
# File 'lib/winrm/wsmv/command_output_decoder.rb', line 25

def decode(raw_output)
  decoded_text = decode_raw_output(raw_output)
  decoded_text = handle_invalid_encoding(decoded_text)
  decoded_text = remove_bom(decoded_text)
  decoded_text
end