Sha256: cd45c91cd171a04bd37c17a3bb7bd758518616fb778f7123671def276a7ca688
Contents?: true
Size: 723 Bytes
Versions: 4
Compression:
Stored size: 723 Bytes
Contents
require_dependency 'censor_bear/application_controller' module CensorBear class HomeController < ApplicationController def index; end def debugger; end def debug content = params[:content] type = params[:type] case params[:stage] when 'aliyun_check' @r = AliyunGreen::Text.scan(content) when 'check_text' @r = CensorBear.check_text(content, type.to_sym) when 'check_search' # TODO: 搜索前置检查 @r = {} when 'check_image' # TODO: 检查图片 @r = {} when 'qq_regex' @r = content.match(Censor::QQ_REG) when 'wx_regex' @r = content.match(Censor::WX_REG) end end end end
Version data entries
4 entries across 4 versions & 1 rubygems