You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
364 B
21 lines
364 B
class ApplicationService
|
|
include Callable
|
|
|
|
Error = Class.new(StandardError)
|
|
|
|
def regix_emoji content
|
|
" " if content.blank?
|
|
regex = /[^a-zA-Z0-9\u4E00-\u9FFF]/
|
|
content.gsub(regex, '')
|
|
end
|
|
|
|
def convert_https content
|
|
content.gsub("http:", "https:")
|
|
end
|
|
|
|
private
|
|
|
|
def strip(str)
|
|
str.to_s.strip.presence
|
|
end
|
|
end |