Class: OnlyofficeTestrailWrapper::StringHelper

Inherits:
Object
  • Object
show all
Defined in:
lib/onlyoffice_testrail_wrapper/helpers/string_helper.rb

Overview

Helper for working with strings

Class Method Summary collapse

Class Method Details

.warnstrip!(string) ⇒ String

Check if string is have spaces in begin or end and remove them

Parameters:

  • string (String)

    to check

Returns:

  • (String)

    string without spaces in begin or end



10
11
12
13
# File 'lib/onlyoffice_testrail_wrapper/helpers/string_helper.rb', line 10

def warnstrip!(string)
  warn "Beginning or end of string has spaces! In: #{string}" unless string == string.strip
  string.strip
end