Class: Hermeneutics::Cli::ImapTools::StringReader

Inherits:
Object
  • Object
show all
Defined in:
lib/hermeneutics/cli/imap/parser.rb

Instance Method Summary collapse

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

Returns:

  • (Boolean)


24
# File 'lib/hermeneutics/cli/imap/parser.rb', line 24

def eof? ; @src.empty? ; end

#readlineObject



21
22
23
# File 'lib/hermeneutics/cli/imap/parser.rb', line 21

def readline
  @src.shift
end