Sha256: 93e51c4b6141aacf66ff4a81a18d3f313953c3921609d908fcf98297b3dce14f
Contents?: true
Size: 350 Bytes
Versions: 10
Compression:
Stored size: 350 Bytes
Contents
class String # Matches any whitespace (including newline) and replaces with a single space # # string = <<-QUERY.compress_lines # SELECT name # FROM users # QUERY # # string #=> "SELECT name FROM users" # def compress_lines(spaced = true) split($/).map{ |line| line.strip }.join(spaced ? ' ' : '') end end
Version data entries
10 entries across 9 versions & 2 rubygems