module StringStripHeredoc

Public Instance Methods

strip_heredoc() click to toggle source
# File lib/npmdc/core/string_strip_heredoc.rb, line 3
def strip_heredoc
  min = scan(/^[ \t]*(?=\S)/).min
  indent = min ? min.size : 0
  gsub(/^[ \t]{#{indent}}/, '')
end