Class: WebSocket::Frame::Data

Inherits:
Object
  • Object
show all
Defined in:
lib/hawkular/operations/operations_api.rb

Overview

helper for parsing the “OperationName=json_payload” messages

Instance Method Summary collapse

Instance Method Details

#to_msg_hashObject



38
39
40
41
42
43
44
# File 'lib/hawkular/operations/operations_api.rb', line 38

def to_msg_hash
  chunks = split('=', 2)

  { operationName: chunks[0], data: JSON.parse(chunks[1]) }
rescue
  {}
end