class String
Custom string extensions
Public Instance Methods
strip_heredoc()
click to toggle source
Remove leading white spaces from a HERE document
# File lib/snipmate_to_yas/string.rb, line 4 def strip_heredoc gsub(/^#{scan(/^\s*/).min_by(&:length)}/, '') end