Sha256: 7a7fecd3c78ea713d0097d8a307d8ff1d0e1ad0f20b872323ef17b23fc372d96

Contents?: true

Size: 185 Bytes

Versions: 7

Compression:

Stored size: 185 Bytes

Contents

class String #:nodoc:
  
  def realign_indentation
    basis = self.index(/\S/) # find the first non-whitespace character
    return self.to_a.map { |s| s[basis..-1] }.join
  end
  
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
templater-0.1.5 lib/templater/core_ext/string.rb
templater-0.1.1 lib/templater/core_ext/string.rb
templater-0.1.2 lib/templater/core_ext/string.rb
templater-0.1.6 lib/templater/core_ext/string.rb
templater-0.1 lib/templater/core_ext/string.rb
templater-0.1.3 lib/templater/core_ext/string.rb
templater-0.1.4 lib/templater/core_ext/string.rb