class Net::IMAP::ResponseParser
Parses an IMAP server response.
Attributes
Public Class Methods
Source
# File lib/net/imap/response_parser.rb, line 20 def initialize(config: Config.global) @str = nil @pos = nil @lex_state = nil @token = nil @config = Config[config] @config = @config.new if @config == Config.global || @config.frozen? end
Creates a new ResponseParser
.
When config
is frozen or global, the parser config
inherits from it. Otherwise, config
will be used directly.
Public Instance Methods
Source
# File lib/net/imap/response_parser.rb, line 35 def parse(str) @str = str @pos = 0 @lex_state = EXPR_BEG @token = nil return response end
Raises ResponseParseError
for unparsable strings.