Sha256: ae5dd451d873956943289990bd8261bb96ec80b9eae33c327e1ff05103cc5296

Contents?: true

Size: 534 Bytes

Versions: 2

Compression:

Stored size: 534 Bytes

Contents

## String#compress_lines

    require 'facets/string/compress_lines'

Matches any whitespace (including newline) at beginning and end of lines,
and replaces with a single space.

    string = <<-QUERY.compress_lines
      SELECT name
      FROM users
    QUERY
    string.assert == "SELECT name FROM users"

Matches any whitespace (including newline) at beginning and end of lines,
and removes it.

    string = <<-QUERY.compress_lines(false)
      SELECT name
      FROM users
    QUERY
    string.assert == "SELECT nameFROM users"

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
facets-glimmer-3.2.0 demo/core/string/compress_lines.md
facets-3.1.0 demo/core/string/compress_lines.md