Class: StringLineReader
- Inherits:
-
Object
- Object
- StringLineReader
- Includes:
- LogUtils::Logging
- Defined in:
- lib/textutils/reader/line_reader.rb
Instance Method Summary collapse
- #each_line ⇒ Object
-
#initialize(text) ⇒ StringLineReader
constructor
A new instance of StringLineReader.
Constructor Details
#initialize(text) ⇒ StringLineReader
Returns a new instance of StringLineReader.
13 14 15 16 |
# File 'lib/textutils/reader/line_reader.rb', line 13 def initialize( text ) logger.info "StringLineReader.new - deprecated API - use LineReader.from_string() instead" @reader = LineReader.from_string( text ) end |
Instance Method Details
#each_line ⇒ Object
18 19 20 21 22 |
# File 'lib/textutils/reader/line_reader.rb', line 18 def each_line @reader.each_line do |line| yield( line ) end # each lines end |