Sha256: eb2c23142727c73e97885eb1aa7646920831701bf8ee43095a8d93a0535459ae

Contents?: true

Size: 239 Bytes

Versions: 38

Compression:

Stored size: 239 Bytes

Contents

module CompressHelper
  def strip_indent(string)
    lines = string.lines
    match = /\A( *)/.match(lines.first)
    whitespaces = match[1].to_s.length
    stripped = lines.map do |line|
      line[whitespaces..-1]
    end.join
  end
end

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
mutant-0.3.0.beta21 spec/support/compress_helper.rb
mutant-0.3.0.beta20 spec/support/compress_helper.rb
mutant-0.3.0.beta19 spec/support/compress_helper.rb
mutant-0.3.0.beta18 spec/support/compress_helper.rb
mutant-0.3.0.beta17 spec/support/compress_helper.rb
mutant-0.3.0.beta16 spec/support/compress_helper.rb
mutant-0.3.0.beta15 spec/support/compress_helper.rb
mutant-0.3.0.beta14 spec/support/compress_helper.rb
mutant-0.3.0.beta13 spec/support/compress_helper.rb
mutant-0.3.0.beta12 spec/support/compress_helper.rb
mutant-0.3.0.beta11 spec/support/compress_helper.rb
mutant-0.3.0.beta10 spec/support/compress_helper.rb
mutant-0.3.0.beta9 spec/support/compress_helper.rb
mutant-0.3.0.beta8 spec/support/compress_helper.rb
mutant-0.3.0.beta7 spec/support/compress_helper.rb
mutant-0.3.0.beta6 spec/support/compress_helper.rb
mutant-0.3.0.beta5 spec/support/compress_helper.rb
mutant-0.3.0.beta4 spec/support/compress_helper.rb
mutant-0.3.0.beta3 spec/support/compress_helper.rb
mutant-0.3.0.beta2 spec/support/compress_helper.rb