Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/ostrichpoll/string.rb

Instance Method Summary collapse

Instance Method Details

#strip_heredocObject



2
3
4
5
# File 'lib/ostrichpoll/string.rb', line 2

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