Sha256: ad0b919dfebbf695ddda3bfea980f60104400c41120c52d931c20643f18ce918
Contents?: true
Size: 768 Bytes
Versions: 2
Compression:
Stored size: 768 Bytes
Contents
module Lumos module Formatters module BaseHorizontal def horizontal_pattern delimiter * chopped_message_length end def horizontal_line paragraph = content_paragraph(chopped_message[0]) paragraph_size = paragraph.size draft_size = horizontal_pattern.size draft_size > paragraph_size ? horizontal_pattern[0...paragraph_size] : horizontal_pattern end def horizontal_padding "\n" * padding if padding > 0 end def horizontal_result "#{horizontal_line}\n"\ "#{horizontal_padding}"\ "#{iterate_chopped_lines{ |line| "#{content_paragraph(line)}\n" }}"\ "#{horizontal_padding}"\ "#{horizontal_line}" end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
lumos-0.0.2 | lib/lumos/formatters/base_horizontal.rb |
lumos-0.0.1 | lib/lumos/formatters/base_horizontal.rb |