mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-09 22:39:50 +08:00
init project
This commit is contained in:
17
app/services/application_service.rb
Normal file
17
app/services/application_service.rb
Normal file
@@ -0,0 +1,17 @@
|
||||
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
|
||||
|
||||
private
|
||||
|
||||
def strip(str)
|
||||
str.to_s.strip.presence
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user