class String
Public Instance Methods
quote(char = '"')
click to toggle source
# File lib/benchcc/ext/string.rb, line 2 def quote(char = '"') char + self + char end
strip_heredoc()
click to toggle source
Strip leading whitespace from each line that is the same as the amount of whitespace on the first line of the string. Leaves additional indentation on later lines intact.
# File lib/benchcc/ext/string.rb, line 9 def strip_heredoc gsub /^#{self[/\A\s*/]}/, '' end