class RuboCop::Cop::RSpec::ExcessiveDocstringSpacing

def strip_excessive_whitespace(text)

Parameters:
  • text (String) --
def strip_excessive_whitespace(text)
  text
    .gsub(/[[:blank:]]{2,}/, ' ')
    .gsub(/\A[[:blank:]]|[[:blank:]]\z/, '')
end