Class: RokkinHelper

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

Class Method Summary collapse

Class Method Details

.strip_heredoc(heredoc) ⇒ Object



39
40
41
42
# File 'lib/rokkin.rb', line 39

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