class OnlyofficeRspecResultParser::StringHelper

Class for string methods

Public Class Methods

delete_px(string) click to toggle source

Delete pixel names from string @param [String] string to delete @return [String] result

# File lib/onlyoffice_rspec_result_parser/helper/string_helper.rb, line 18
def self.delete_px(string)
  string.gsub 'px', ''
end
get_style_param(string, param) click to toggle source

Get style param from string @param [String] string with style @param [String] param name @return [String] result

# File lib/onlyoffice_rspec_result_parser/helper/string_helper.rb, line 10
def self.get_style_param(string, param)
  m = string.match(/#{param}:\s(.*);/)
  m[1]
end