Module: Gemmy::Patches::StringPatch::InstanceMethods::CompressLines

Defined in:
lib/gemmy/patches/string_patch.rb

Instance Method Summary collapse

Instance Method Details

#compress_lines(spaced = true) ⇒ Object

facets replace newlines or N spaces with one space



229
230
231
# File 'lib/gemmy/patches/string_patch.rb', line 229

def compress_lines(spaced = true)
  split($/).map{ |line| line.strip }.join(spaced ? ' ' : '')
end