Advertisement
Guest User

Untitled

a guest
Oct 28th, 2016
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. require 'net/imap'
  2. module Net
  3. class IMAP
  4. class ResponseParser
  5. def response
  6. token = lookahead
  7. case token.symbol
  8. when T_PLUS
  9. result = continue_req
  10. when T_STAR
  11. result = response_untagged
  12. else
  13. result = response_tagged
  14. end
  15. match(T_SPACE) if lookahead.symbol == T_SPACE
  16. match(T_CRLF)
  17. match(T_EOF)
  18. return result
  19. end #def response
  20. end #class ResponseParser
  21. end #class IMAP
  22. end #module Net
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement