Module: Srx::Util
- Defined in:
- lib/srx/util.rb
Overview
Miscellaneous utility functions
Class Method Summary collapse
-
.unwrap(str) ⇒ String
Remove linebreaks that wrap lines.
Class Method Details
.unwrap(str) ⇒ String
Remove linebreaks that wrap lines.
11 12 13 |
# File 'lib/srx/util.rb', line 11 def unwrap(str) str.gsub(/(?<=\S)\n(?=\S)/, ' ') end |