module WinRM::PSRP::MessageData

PowerShell Remoting Protocol message data.

PowerShell Remoting Protocol message data.

Public Class Methods

camelize(underscore) click to toggle source
# File lib/winrm/psrp/message_data.rb, line 35
def self.camelize(underscore)
  underscore.split('_').collect(&:capitalize).join
end
parse(message) click to toggle source
# File lib/winrm/psrp/message_data.rb, line 29
def self.parse(message)
  type_key = WinRM::PSRP::Message::MESSAGE_TYPES.key(message.type)
  type = camelize(type_key.to_s).to_sym
  const_get(type).new(message.data) if MessageData.constants.include?(type)
end