lib/web_purify/methods/text_filters.rb
def return(text, options={})
      params = {
        :method => WebPurify::Constants.methods[:return],
        :text   => text
      }
      parsed = WebPurify::Request.query(text_request_base, @query_base, params.merge(options))
      if parsed[:expletive].is_a?(String)
        return [] << parsed[:expletive]
      else
        return parsed.fetch(:expletive, [])
      end
    end
# Return an array of matched profanity
#
# @param  text    [String]  Text to test for profanity
# @param  options [Hash]    Options hash, used to set additional parameters
# @return         [Array]   The array of matched profane words
Return an array of matched profanity
Return an array of matched profanity
def return(text, options={})
      params = {
        :method => WebPurify::Constants.methods[:return],
        :text   => text
      }
      parsed = WebPurify::Request.query(text_request_base, @query_base, params.merge(options))
      if parsed[:expletive].is_a?(String)
        return [] << parsed[:expletive]
      else
        return parsed.fetch(:expletive, [])
      end
    end
def return ( text , options = { } ) params = { :method => WebPurify :: Constants . methods [ :return ] , :text => text } parsed = WebPurify :: Request . query ( text_request_base , @query_base , params . merge ( options ) ) if parsed [ :expletive ] . is_a? ( String ) return [ ] << parsed [ :expletive ] else return parsed . fetch ( :expletive , [ ] ) end end
Return an array of matched profanity
Return an array of matched profanity
The array of matched profane words
The array of matched profane words
Array
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