Sha256: df234f67aa070d07f295dbbcafd9515b9886e0d327e30fb12758d4d832a1f284

Contents?: true

Size: 601 Bytes

Versions: 2

Compression:

Stored size: 601 Bytes

Contents

# frozen_string_literal: true

module RubyJard
  class Column
    # Only break at breakable word
    # | this_is_a <endline> |
    # | really_long_content |
    WORD_WRAP_NORMAL = :normal
    # Break the word, and move the rest to the next line
    # | this_is_a really_lon|
    # | g_content           |
    WORD_WRAP_BREAK_WORD = :break_word
    extend Forwardable

    attr_accessor :spans, :content_length, :width, :word_wrap

    def initialize(spans: [], word_wrap: WORD_WRAP_NORMAL)
      @spans = spans
      @width = 0
      @content_length = 0
      @word_wrap = word_wrap
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ruby_jard-0.2.2 lib/ruby_jard/column.rb
ruby_jard-0.2.1 lib/ruby_jard/column.rb