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



223
224
225
# File 'lib/gemmy/patches/string_patch.rb', line 223

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