Class: LovelyRufus::TextWrapper
- Inherits:
-
Object
- Object
- LovelyRufus::TextWrapper
- Defined in:
- lib/lovely_rufus/text_wrapper.rb
Constant Summary collapse
- QUOTES =
/^([>\/#])(\1| )*/
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(wrap) ⇒ TextWrapper
constructor
A new instance of TextWrapper.
Constructor Details
#initialize(wrap) ⇒ TextWrapper
Returns a new instance of TextWrapper.
16 17 18 |
# File 'lib/lovely_rufus/text_wrapper.rb', line 16 def initialize(wrap) @wrap = wrap end |
Class Method Details
.wrap(text, width: 72) ⇒ Object
12 13 14 |
# File 'lib/lovely_rufus/text_wrapper.rb', line 12 def self.wrap(text, width: 72) new(Wrap[text, width: width]).call end |