Sha256: 0347b8f5ec2df61ff751a2c499e2479a54cdd34e010a3aa93e3d47e07987ee36

Contents?: true

Size: 180 Bytes

Versions: 2

Compression:

Stored size: 180 Bytes

Contents

class String

  # Aligns each line n spaces.
  #
  # CREDIT: Gavin Sinclair
  #
  def tab(n)
    gsub(/^ */, ' ' * n)
  end

  def add(string)
    self << "\n#{string}"
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
olauzon-weekender-0.0.0 lib/core_ext/string.rb
olauzon-weekender-0.0.1 lib/core_ext/string.rb