Module: Wrapomatic
- Defined in:
- lib/wrapomatic.rb,
lib/wrapomatic/line.rb,
lib/wrapomatic/version.rb,
lib/wrapomatic/wrapper.rb,
lib/wrapomatic/line/processor.rb,
lib/wrapomatic/line/processor/base.rb,
lib/wrapomatic/line/processor/primary.rb,
lib/wrapomatic/line/processor/remainder.rb
Overview
Let’s line wrap some strings!
Defined Under Namespace
Constant Summary collapse
- VERSION =
The current Wrapomatic version
"0.3.0"
Class Method Summary collapse
-
.wrap(text, options = {}) ⇒ String
Wraps the given text with optional indentation and width.
Class Method Details
.wrap(text, options = {}) ⇒ String
Wraps the given text with optional indentation and width
21 22 23 24 25 |
# File 'lib/wrapomatic.rb', line 21 def self.wrap(text, = {}) indents = [:indents] || 0 columns = [:columns] || 80 Wrapper.new(text, indents, columns).wrapped end |