module Wrapomatic::Line::Processor

A deep and dark module that really shouldn't be used directly

@api private

Public Class Methods

process(line) click to toggle source

Process a line

@param [Line] a Line object to process

@return [Array<String>] the processed line, broken into individually

wrapped lines
# File lib/wrapomatic/line/processor.rb, line 18
def self.process(line)
  columns = line.columns
  indents = line.indents
  text = line.indented

  [Primary.new(text, columns).content] +
    line.class.new(
      Remainder.new(text, columns).content,
      indents,
      columns
    ).wrapped
end