lib/web_purify/methods/text_filters.rb
# Check for existence of profanity and return number of profane words found
#
# @param  text    [String]  Text to test for profanity
# @param  options [Hash]    Options hash, used to set additional parameters
# @return         [Integer] The number of profane words found in text 
Check for existence of profanity and return number of profane words found
Check for existence of profanity and return number of profane words found
def check_count(text, options={})
      params = {
        :method => WebPurify::Constants.methods[:check_count],
        :text   => text
      }
      parsed = WebPurify::Request.query(text_request_base, @query_base, params.merge(options))
      return parsed[:found].to_i
    end
def check_count ( text , options = { } ) params = { :method => WebPurify :: Constants . methods [ :check_count ] , :text => text } parsed = WebPurify :: Request . query ( text_request_base , @query_base , params . merge ( options ) ) return parsed [ :found ] . to_i end
Check for existence of profanity and return number of profane words found
Check for existence of profanity and return number of profane words found
The number of profane words found in text
The number of profane words found in text
Integer
text
Text to test for profanity
Text to test for profanity
options
Options hash, used to set additional parameters
Options hash used to set additional parameters