lib/powertrack/streaming/stream.rb
# Returns the type of message received on the stream, together with a
# level indicator in case of a system message, nil otherwise.
Returns the type of message received on the stream, together with a
level indicator in case of a system message, nil otherwise.
Returns the type of message received on the stream together with a level indicator in case of a system message nil otherwise .
def message_type(message)
      case message
      when HEARTBEAT_MESSAGE_PATTERN then [ :heartbeat, nil ]
      when SYSTEM_MESSAGE_PATTERN then [ :system, $1.downcase.to_sym ]
      else
        [ :activity, nil ]
      end
    end
def message_type ( message ) case message when HEARTBEAT_MESSAGE_PATTERN then [ :heartbeat , nil ] when SYSTEM_MESSAGE_PATTERN then [ :system , $1 . downcase . to_sym ] else [ :activity , nil ] end end
Returns the type of message received on the stream, together with a
level indicator in case of a system message, nil otherwise.
Returns the type of message received on the stream together with a level indicator in case of a system message nil otherwise .
message