Sha256: 42b9445d3d83b09cbbe8b56e3acf72490f92dc49ddc185b264b38e3f27288c79
Contents?: true
Size: 297 Bytes
Versions: 10
Compression:
Stored size: 297 Bytes
Contents
unless String.public_instance_methods.include? :strip_heredoc String.class_exec do # self is set to the String class def strip_heredoc leading_space = scan(/^[ \t]*(?=\S)/).min indent = leading_space ? leading_space.size : 0 gsub(/^[ \t]{#{indent}}/, '') end end end
Version data entries
10 entries across 10 versions & 1 rubygems