class String
Public Instance Methods
indent_heredoc(indent = 0)
click to toggle source
# File lib/glima/resource.rb, line 2 def indent_heredoc(indent = 0) strip_heredoc.gsub(/^/, ' ' * indent) end
strip_heredoc()
click to toggle source
# File lib/glima/resource.rb, line 6 def strip_heredoc indent = scan(/^[ \t]*(?=\S)/).min.size rescue 0 gsub(/^[ \t]{#{indent}}/, '') end