class String
Add remove indent to the String
class
Public Instance Methods
remove_indent()
click to toggle source
a helper for writing multi-line strings for error messages example usage
puts <<-HEREDOC.remove_indent This command does such and such. this part is extra indented HEREDOC
@return [String]
# File lib/textmate_grammar/util.rb, line 25 def remove_indent gsub(/^[ \t]{#{match(/^[ \t]*/)[0].length}}/, '') end