Skip to content

gkobluk/sensitive_text_filter

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Installation

Add this line to your application's Gemfile:

gem 'sensitive_text_filter', :github => 'gkobluk/sensitive_text_filter'

And then execute:

$ bundle

Usage

Need a new language filter? Here's a quick usage example:

phone = SensitiveTextFilter::Filter.new matchlist: :phone, replacement: :phone

# returns true if any content matched the filter's matchlist, else false
phone.match?('Call us: 0880-333-2333 content.')
=> true

# returns a "cleaned up" version of the text, based on the replacement rule
phone.sanitize('Call us: 0880-333-2333 content.')
=> "'Call us: [hidden phone] content."

same for :address and :email

About

Sensitive Text Filter is a Ruby gem to detect and optionally filter multiple categories of sensitive data.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Ruby 100.0%