Class: Torkify::Log::LogReader
- Inherits:
-
Object
- Object
- Torkify::Log::LogReader
- Defined in:
- lib/torkify/log/log_reader.rb
Instance Attribute Summary collapse
-
#line ⇒ Object
readonly
Returns the value of attribute line.
Instance Method Summary collapse
- #forward ⇒ Object
-
#initialize(stream) ⇒ LogReader
constructor
A new instance of LogReader.
- #matcher ⇒ Object
Constructor Details
#initialize(stream) ⇒ LogReader
Returns a new instance of LogReader.
7 8 9 10 |
# File 'lib/torkify/log/log_reader.rb', line 7 def initialize(stream) @stream = stream @line = stream.readline end |
Instance Attribute Details
#line ⇒ Object
Returns the value of attribute line.
5 6 7 |
# File 'lib/torkify/log/log_reader.rb', line 5 def line @line end |
Instance Method Details
#forward ⇒ Object
12 13 14 15 |
# File 'lib/torkify/log/log_reader.rb', line 12 def forward self.line = stream.readline self end |
#matcher ⇒ Object
18 19 20 |
# File 'lib/torkify/log/log_reader.rb', line 18 def matcher @matcher ||= LineMatcher.new(line) end |