Class: Hermeneutics::Cli::ImapTools::StringReader
- Inherits:
-
Object
- Object
- Hermeneutics::Cli::ImapTools::StringReader
- Defined in:
- lib/hermeneutics/cli/imap/parser.rb
Instance Method Summary collapse
- #eof? ⇒ Boolean
-
#initialize(src) ⇒ StringReader
constructor
A new instance of StringReader.
- #readline ⇒ Object
Constructor Details
#initialize(src) ⇒ StringReader
Returns a new instance of StringReader.
17 18 19 20 |
# File 'lib/hermeneutics/cli/imap/parser.rb', line 17 def initialize src @src = src.lines @src.each { |l| l.chomp! } end |
Instance Method Details
#eof? ⇒ Boolean
24 |
# File 'lib/hermeneutics/cli/imap/parser.rb', line 24 def eof? ; @src.empty? ; end |
#readline ⇒ Object
21 22 23 |
# File 'lib/hermeneutics/cli/imap/parser.rb', line 21 def readline @src.shift end |