Class: WarningsLogger::Reader
- Inherits:
-
Object
- Object
- WarningsLogger::Reader
- Extended by:
- Forwardable
- Defined in:
- lib/warnings_logger/reader.rb
Instance Attribute Summary collapse
-
#warning_groups ⇒ Object
readonly
Returns the value of attribute warning_groups.
Instance Method Summary collapse
-
#initialize(filesystem) ⇒ Reader
constructor
A new instance of Reader.
- #read ⇒ Object
Constructor Details
#initialize(filesystem) ⇒ Reader
Returns a new instance of Reader.
9 10 11 12 13 |
# File 'lib/warnings_logger/reader.rb', line 9 def initialize(filesystem) @filesystem = filesystem @current_group = [] @warning_groups = [] end |
Instance Attribute Details
#warning_groups ⇒ Object (readonly)
Returns the value of attribute warning_groups.
7 8 9 |
# File 'lib/warnings_logger/reader.rb', line 7 def warning_groups @warning_groups end |
Instance Method Details
#read ⇒ Object
15 16 17 18 19 20 21 22 23 |
# File 'lib/warnings_logger/reader.rb', line 15 def read warnings_file.rewind warnings_file.each_line do |line| process_line(line) end add_group(current_group) end |