Sha256: ba1f436e733c6bb7ecfa59e5dd38018bccbd3bc897144c62e26d56325614666c

Contents?: true

Size: 123 Bytes

Versions: 532

Compression:

Stored size: 123 Bytes

Contents

class String
  def unindent(left_padding = '')
    gsub(/^#{scan(/^\s*/).min_by{ |l| l.length }}/, left_padding)
  end
end

Version data entries

532 entries across 532 versions & 1 rubygems

Version Path
puppet-8.3.0 spec/lib/puppet_spec/unindent.rb
puppet-8.3.0-x86-mingw32 spec/lib/puppet_spec/unindent.rb
puppet-8.3.0-x64-mingw32 spec/lib/puppet_spec/unindent.rb
puppet-8.3.0-universal-darwin spec/lib/puppet_spec/unindent.rb
puppet-8.4.0 spec/lib/puppet_spec/unindent.rb
puppet-8.4.0-x86-mingw32 spec/lib/puppet_spec/unindent.rb
puppet-8.4.0-x64-mingw32 spec/lib/puppet_spec/unindent.rb
puppet-8.4.0-universal-darwin spec/lib/puppet_spec/unindent.rb
puppet-7.28.0 spec/lib/puppet_spec/unindent.rb
puppet-7.28.0-x86-mingw32 spec/lib/puppet_spec/unindent.rb
puppet-7.28.0-x64-mingw32 spec/lib/puppet_spec/unindent.rb
puppet-7.28.0-universal-darwin spec/lib/puppet_spec/unindent.rb
puppet-8.3.1 spec/lib/puppet_spec/unindent.rb
puppet-8.3.1-x86-mingw32 spec/lib/puppet_spec/unindent.rb
puppet-8.3.1-x64-mingw32 spec/lib/puppet_spec/unindent.rb
puppet-8.3.1-universal-darwin spec/lib/puppet_spec/unindent.rb
puppet-7.27.0 spec/lib/puppet_spec/unindent.rb
puppet-7.27.0-x86-mingw32 spec/lib/puppet_spec/unindent.rb
puppet-7.27.0-x64-mingw32 spec/lib/puppet_spec/unindent.rb
puppet-7.27.0-universal-darwin spec/lib/puppet_spec/unindent.rb