Sha256: fc529895f4ce3beea24ab59173bd1803dec90e5834ba90cd10570144acca04bb
Contents?: true
Size: 373 Bytes
Versions: 1
Compression:
Stored size: 373 Bytes
Contents
# frozen_string_literal: true module Prompts class Paragraph include TextUtils LINE_PADDING = 3 def initialize(text, width: 60) @text = text @width = width - (LINE_PADDING + 1) @line_padding = SPACE * LINE_PADDING end def lines wrap_text(@text, width: @width, line_prefix: @line_padding, alignment: :none) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
prompts-0.2.0 | lib/prompts/paragraph.rb |