Class: Net::IMAP::ResponseParser

Inherits:
Object
  • Object
show all
Defined in:
lib/catfriend/net_imap_exchange_patch.rb

Instance Method Summary collapse

Instance Method Details

#responseObject



13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/catfriend/net_imap_exchange_patch.rb', line 13

def response
  token = lookahead
  case token.symbol
  when T_PLUS
    result = continue_req
  when T_STAR
    result = response_untagged
  else
    result = response_tagged
  end
  match(T_SPACE) if lookahead.symbol == T_SPACE
  match(T_CRLF)
  match(T_EOF)
  return result
end