lib/voltron/encrypt.rb in voltron-encrypt-0.1.3 vs lib/voltron/encrypt.rb in voltron-encrypt-0.1.4
- old
+ new
@@ -1,9 +1,10 @@
require "voltron"
require "voltron/encrypt/version"
require "voltron/config/encrypt"
require "voltron/encryptable"
+require "voltron/encrypt/active_record/collection_association"
module Voltron
class Encrypt
def encode(input)
@@ -47,18 +48,18 @@
regex = Regexp.new(pattern.join, Regexp::IGNORECASE)
!blacklist(encoded.length).match(regex).nil?
end
- private
-
- def blacklist(len = 6)
- if File.exist?(Voltron.config.encrypt.blacklist.to_s)
- File.readlines(Voltron.config.encrypt.blacklist).map(&:strip).reject { |line| line.length > len }.join(" ")
- else
- ""
- end
+ def blacklist(len = 6)
+ if File.exist?(Voltron.config.encrypt.blacklist.to_s)
+ File.readlines(Voltron.config.encrypt.blacklist).map(&:strip).reject { |line| line.length > len }.join(" ")
+ else
+ ""
end
+ end
+
+ private
def translations
{
"a" => ["4"],
"e" => ["3"],