@param [Symbol] type
 @param [String] message
 @param [LL::SourceLine] source_line


 Returns a String containing details of the message, complete with ANSI
 colour sequences.

 @return [String]
165267
def to_s
      location = ANSI.ansi("#{determine_path}:#{line}:#{column}", :white, :bold)

      type_label = ANSI.ansi(type.to_s, COLORS[type], :bold)
      msg_line   = "#{location}:#{type_label}: #{message}"

      return "#{msg_line}\n#{source_line.source}\n#{marker}"
    end
124774
def parse(raw_line)
      line = decompose(raw_line)

      if line.command =~ /^(PRIVMSG|NOTICE)$/ && line.args[1] =~ /\x01/
        return handle_ctcp_message(line)
      end

      msg_class = case
      when line.command =~ /^\d{3}$/
        begin
          constantize("IRCSupport::Message::Numeric#{line.command}")
        rescue
          constantize("IRCSupport::Message::Numeric")
        end
      when line.command == "MODE"
        if @isupport['CHANTYPES'].include?(line.args[0][0])
          constantize("IRCSupport::Message::ChannelModeChange")
        else
          constantize("IRCSupport::Message::UserModeChange")
        end
      when line.command == "NOTICE" && (!line.prefix || line.prefix !~ /!/)
        constantize("IRCSupport::Message::ServerNotice")
      when line.command == "CAP" && %w{LS LIST ACK}.include?(line.args[0])
        constantize("IRCSupport::Message::CAP::#{line.args[0]}")
      else
        begin
          constantize("IRCSupport::Message::#{line.command.capitalize}")
        rescue
          constantize("IRCSupport::Message")
        end
      end

      message = msg_class.new(line, @isupport, @capabilities)

      case message.type
      when :'005'
        @isupport.merge! message.isupport
      when :cap_ack
        message.capabilities.each do |capability, options|
          if options.include?(:disable)
            @capabilities = @capabilities - [capability]
          elsif options.include?(:enable)
            @capabilities = @capabilities + [capability]
          end
        end
      end

      return message
    end
359056
def from_message(cls, message):
        
        type_ = message.get_text()
        return cls(type_=type_, blob=message.asbytes())
945397
private String getMessageType(FacesMessage message) {
		if (message.getSeverity().equals(FacesMessage.SEVERITY_WARN))
			return "warning";
		else if (message.getSeverity().equals(FacesMessage.SEVERITY_ERROR))
			return "danger";
		else if (message.getSeverity().equals(FacesMessage.SEVERITY_FATAL))
			return "danger";
		else if (message.getSeverity().equals(FacesMessage.SEVERITY_INFO))
			return "info";
		return "success";
	}
994102
function formatMessage (message) {
  return '<error' +
    attr(message, 'line') +
    attr(message, 'column') +
    attr(message, 'severity') +
    attr(message, 'message') +
    ('source' in message ? attr(message, 'source') : '') +
    ' />'
}
142142
def _special(self, message: str, with_gap: bool=True):
        
        if with_gap:
            self._line_break()
        self._log(self._set_color(message, self.GREEN))
229733
def format_message(self, message):
        
        look = Look(message)
        return look.pretty(display=False)
629917
def say(message, *args)
      options = args.extract_options!
      color   = args.first
      
      growl(message) if options[:growl]
      message = (' ' * padding) + message.to_s
      message = self.color(message, color) if color

      $stdout.puts(message)
    end
866406
def flake(self, message):
        
        err_range = {
            'start': {'line': message.lineno - 1, 'character': message.col},
            'end': {'line': message.lineno - 1, 'character': len(self.lines[message.lineno - 1])},
        }

        severity = lsp.DiagnosticSeverity.Warning
        for message_type in PYFLAKES_ERROR_MESSAGES:
            if isinstance(message, message_type):
                severity = lsp.DiagnosticSeverity.Error
                break

        self.diagnostics.append({
            'source': 'pyflakes',
            'range': err_range,
            'message': message.message % message.message_args,
            'severity': severity
        })
207928
def lines(strip_colors = false)
      lines = []
      Weechat::Infolist.parse("buffer_lines", @ptr).each do |line|
        line = Weechat::Line.from_hash(line)
        if strip_colors
          line.prefix.strip_colors!
          line.message.strip_colors!
        end
        lines << line
      end

      lines
    end
207646
def ruby_lines(text):
    
    if isinstance(text, basestring):
        text = text.splitlines()
    elif not isinstance(text, list):
        raise TypeError("text should be a list or a string, not %s"
                        % type(text))
    return [l.strip() for l in text if l.strip() and not
            l.strip().startswith('#')]
1216183
def say(message = '', color = nil, new_line = nil)
      Strainer.log.info(message.gsub(/\e\[\d+[;\d]*m/, ''))

      return if quiet?
      super(message, color)
    end
707638
def message(message, verbose_prefix = '', relative_indentation = 2)
      message = verbose_prefix + message if verbose?
      puts_indented message if verbose?

      @indentation_level += relative_indentation
      yield if block_given?
      @indentation_level -= relative_indentation
    end
814920
def line_type(self, line_type):
        
        allowed_values = ["linear", "step-before", "step-after", "basis", "cardinal", "monotone"]  # noqa: E501
        if line_type not in allowed_values:
            raise ValueError(
                "Invalid value for `line_type` ({0}), must be one of {1}"  # noqa: E501
                .format(line_type, allowed_values)
            )

        self._line_type = line_type
613420
def has_line_type?(line_type)
      return true if @lines.length == 1 && @lines[0][:line_type] == line_type.to_sym
      @lines.find { |l| l[:line_type] == line_type.to_sym }
    end
1215201
def parse
      if pre_parse
        messages = @file_reader.other_lines.map do |line|
          basic_message_match =  @line_regex.match(line)
          meta_message_match = @line_regex_status.match(line)
          if basic_message_match
            create_message(basic_message_match)
          elsif meta_message_match
            create_status_or_event_message(meta_message_match)
          end
        end

        Chat.new(messages, @metadata)
      end
    end
202754
def decode_rcvd_msg(pref, message, seqnum, pretty=False):
    
    newline = "\n" if pretty else " "
    indent = "    " if pretty else ""
    start = newline + indent

    out = []
    out.append("%s%s{%sSEQNUM: %d," % (pref, newline, start, seqnum))
    out.append("%sCLIENTREF: %s," % (start, message[Const.M_CLIENTREF]))
    out.append("%sTYPE: %s," % (start, M_TYPES[message[Const.M_TYPE]]))
    if message[Const.M_TYPE] in M_SUB_TYPES:
        out.append("%sPAYLOAD: {CODE: %s, MESSAGE: %s}" %
                   (start, M_SUB_TYPES[message[Const.M_TYPE]][message[Const.M_PAYLOAD][Const.P_CODE]],
                    message[Const.M_PAYLOAD][Const.P_MESSAGE]))
    else:
        payload = None
        if message[Const.M_PAYLOAD] is not None:
            payload = {}
            for item in message[Const.M_PAYLOAD]:
                if item == Const.P_RESOURCE:
                    payload['RESOURCE'] = R_TYPES[message[Const.M_PAYLOAD][Const.P_RESOURCE]]
                else:
                    payload[item] = message[Const.M_PAYLOAD][item]
        out.append("%sPAYLOAD: %s" % (start, payload))
    out.append("%s}" % newline)

    return ''.join(out)