Sha256: 2801114b24b630143ed2b2d1e64ba7546d499ebc8d02fc2c3da75c6956cbc2f9

Contents?: true

Size: 199 Bytes

Versions: 1

Compression:

Stored size: 199 Bytes

Contents

module LovelyRufus class BasicWrapper < Layer
  def call wrap
    wrapped = wrap.text.gsub(/(.{1,#{wrap.width}})( |$\n?)/, "\\1\n")
    next_layer.call Wrap[wrapped, width: wrap.width]
  end
end end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
lovely_rufus-0.1.1 lib/lovely_rufus/basic_wrapper.rb