Module | DataMapper::Ext::String |
In: |
lib/dm-core/support/ext/string.rb
|
Replace sequences of whitespace (including newlines) with either a single space or remove them entirely (according to param spaced).
compress_lines(<<QUERY) SELECT name FROM users QUERY => "SELECT name FROM users"
@param [String] string
The input string.
@param [TrueClass, FalseClass] spaced (default=true)
Determines whether returned string has whitespace collapsed or removed.
@return [String] The input string with whitespace (including newlines) replaced.
@api semipublic