lib/web_purify/methods/text_filters.rb
# Replace any matched profanity with provided symbol
#
# @param  text    [String]  Text to test for profanity
# @param  symbol  [String]  The symbol to replace each character of matched profanity
# @param  options [Hash]    Options hash, used to set additional parameters
# @return         [String]  The original text, replaced with the provided symbol
Replace any matched profanity with provided symbol
Replace any matched profanity with provided symbol
def replace(text, symbol, options={})
      params = {
        :method        => WebPurify::Constants.methods[:replace],
        :text          => text,
        :replacesymbol => symbol
      }
      parsed = WebPurify::Request.query(text_request_base, @query_base, params.merge(options))
      return parsed[:text]
    end
def replace ( text , symbol , options = { } ) params = { :method => WebPurify :: Constants . methods [ :replace ] , :text => text , :replacesymbol => symbol } parsed = WebPurify :: Request . query ( text_request_base , @query_base , params . merge ( options ) ) return parsed [ :text ] end
Replace any matched profanity with provided symbol
Replace any matched profanity with provided symbol
The original text, replaced with the provided symbol
The original text replaced with the provided symbol
String
text
Text to test for profanity
Text to test for profanity
symbol
The symbol to replace each character of matched profanity
The symbol to replace each character of matched profanity
options
Options hash, used to set additional parameters
Options hash used to set additional parameters