Module: Devformance::BulletLogParser
- Defined in:
- lib/devformance/bullet_log_parser.rb
Defined Under Namespace
Classes: Warning
Constant Summary collapse
- BLOCK_START =
/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\[WARN\]/
Class Method Summary collapse
Class Method Details
.parse(content) ⇒ Object
7 8 9 10 |
# File 'lib/devformance/bullet_log_parser.rb', line 7 def self.parse(content) blocks = content.split(BLOCK_START).map(&:strip).reject(&:empty?) blocks.filter_map { |block| parse_block(block) } end |