Sha256: 08ceab84f908b3ecbf3a4ff32975f93272ff98ff91763281c8a64c269bc5765e

Contents?: true

Size: 204 Bytes

Versions: 48

Compression:

Stored size: 204 Bytes

Contents

class String
  def undent
    a = $1 if match(/\A(\s+)(.*\n)(?:\1.*\n)*\z/)
    gsub(/^#{a}/,'')
  end
  alias :dedent :undent

  def starts_with?(characters)
    !!self.match(/^#{characters}/)
  end
end

Version data entries

48 entries across 48 versions & 2 rubygems

Version Path
socialcast-git-extensions-4.1.4 lib/socialcast-git-extensions/string_ext.rb
socialcast-git-extensions-4.1.3 lib/socialcast-git-extensions/string_ext.rb
socialcast-git-extensions-4.1.2 lib/socialcast-git-extensions/string_ext.rb
socialcast-git-extensions-4.1.1 lib/socialcast-git-extensions/string_ext.rb
socialcast-git-extensions-4.1.0 lib/socialcast-git-extensions/string_ext.rb
socialcast-git-extensions-4.0.3 lib/socialcast-git-extensions/string_ext.rb
socialcast-git-extensions-4.0.2 lib/socialcast-git-extensions/string_ext.rb
socialcast-git-extensions-4.0.1 lib/socialcast-git-extensions/string_ext.rb
socialcast-git-extensions-4.0 lib/socialcast-git-extensions/string_ext.rb
socialcast-git-extensions-3.3 lib/socialcast-git-extensions/string_ext.rb
socialcast-git-extensions-3.2 lib/socialcast-git-extensions/string_ext.rb
socialcast-git-extensions-3.1.33 lib/socialcast-git-extensions/string_ext.rb
socialcast-git-extensions-3.1.32 lib/socialcast-git-extensions/string_ext.rb
socialcast-git-extensions-3.1.31 lib/socialcast-git-extensions/string_ext.rb
socialcast-git-extensions-3.1.30 lib/socialcast-git-extensions/string_ext.rb
socialcast-git-extensions-3.1.29 lib/socialcast-git-extensions/string_ext.rb
socialcast-git-extensions-3.1.28 lib/socialcast-git-extensions/string_ext.rb
socialcast-git-extensions-3.1.27 lib/socialcast-git-extensions/string_ext.rb
socialcast-git-extensions-3.1.26 lib/socialcast-git-extensions/string_ext.rb
socialcast-git-extensions-3.1.25 lib/socialcast-git-extensions/string_ext.rb