Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/alfred/util.rb

Instance Method Summary collapse

Instance Method Details

#strip_heredocObject



6
7
8
9
# File 'lib/alfred/util.rb', line 6

def strip_heredoc
  indent = scan(/^[ \t]*(?=\S)/).min.size || 0
  gsub(/^[ \t]{#{indent}}/, '')
end