class Net::IMAP::ResponseParser

Parses an IMAP server response.

Attributes

config[R]

Public Class Methods

Net::IMAP::ResponseParser.new → Net::IMAP::ResponseParser click to toggle source
# File net-imap-0.4.16/lib/net/imap/response_parser.rb, line 17
def initialize(config: Config.global)
  @str = nil
  @pos = nil
  @lex_state = nil
  @token = nil
  @config = Config[config]
end

Public Instance Methods

parse(str) → ContinuationRequest click to toggle source
parse(str) → UntaggedResponse
parse(str) → TaggedResponse

Raises ResponseParseError for unparsable strings.

# File net-imap-0.4.16/lib/net/imap/response_parser.rb, line 31
def parse(str)
  @str = str
  @pos = 0
  @lex_state = EXPR_BEG
  @token = nil
  return response
end