The gibberish_detector gem takes a string and analyzes it for gibberish characters. If it detects gibberish, it returns true and if not it returns false. Based on buggedcom's Gibberish-Detector-PHP and, in turn, rrenaud's Gibberish-Detector.
"aosdfj".gibberish?
#=> true
"hello world".gibberish?
#=> false
Add this line to your application's Gemfile:
gem 'gibberish_detector'
And then execute:
$ bundle
Or install it yourself with:
$ gem install gibberish_detector
You may use the .gibberish?
predicate method on a string, or call the detector directly with GibberishDetector.gibberish?
.
"aosdfj".gibberish?
#=> true
"Hello world".gibberish?
#=> false
## Functionally equivalent to:
GibberishDetector.gibberish?("aosdfj")
#=> true
GibberishDetector.gibberish?("Hello world")
#=> false
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
Please see CREDITS.md for the well deserved credits for this functionality.