# Word-wrap in Ruby

DevFeed: [Word-wrap in Ruby](<https://devfeed.tech/articles/word-wrap-in-ruby-40761.md>)

Original publisher: [Read original article](<https://radek.io/posts/word-wrap-in-ruby/>)

Published: 2014-01-25T00:00:00Z

Content type: tutorial

Language: en

Sources: [Radek Pazdera](<https://devfeed.tech/sources/radek-pazdera.md>)

Topics: [Ruby](<https://devfeed.tech/topics/ruby.md>), [Command-line interface](<https://devfeed.tech/topics/cli.md>), [Library](<https://devfeed.tech/topics/library.md>), [rubygems](<https://devfeed.tech/topics/rubygems.md>)

Tags: [cli](<https://devfeed.tech/tags/cli.md>), [command-line](<https://devfeed.tech/tags/command-line.md>), [library](<https://devfeed.tech/tags/library.md>), [ruby](<https://devfeed.tech/tags/ruby.md>), [rubygems](<https://devfeed.tech/tags/rubygems.md>)

## AI overview

The article introduces the word_wrap Ruby gem, a small utility that wraps text files through a command-line interface or Ruby code. It explains its wrapping and exact-fit modes, including when each mode is suitable for plain text or whitespace-sensitive code.

## Source excerpt

As simple as it gets CLI tool and Ruby library