Module: Codnar::Grouper
- Defined in:
- lib/codnar/grouper.rb
Overview
Group classified lines according to kind.
Class Method Summary collapse
-
.lines_to_groups(lines) ⇒ Object
Convert array of classified lines to array of classified line groups with the same line kind.
Class Method Details
.lines_to_groups(lines) ⇒ Object
Convert array of classified lines to array of classified line groups with the same line kind.
8 9 10 11 |
# File 'lib/codnar/grouper.rb', line 8 def self.lines_to_groups(lines) groups = lines.reduce([], &method(:group_next_line)) return groups end |