Class: Clef::Layout::PageBreaker
- Inherits:
-
Object
- Object
- Clef::Layout::PageBreaker
- Defined in:
- lib/clef/layout/page_breaker.rb
Instance Method Summary collapse
Instance Method Details
#break_into_pages(lines, page_height:, line_height:) ⇒ Array<Array<Array<Hash>>>
10 11 12 13 |
# File 'lib/clef/layout/page_breaker.rb', line 10 def break_into_pages(lines, page_height:, line_height:) max_lines = [(page_height / line_height).floor, 1].max lines.each_slice(max_lines).to_a end |