lib/encrypted_strings/extensions/string.rb in encrypted_strings-0.0.5 vs lib/encrypted_strings/extensions/string.rb in encrypted_strings-0.1.0

- old
+ new

@@ -186,11 +186,11 @@ end end def encryptor_from_args(*args) #:nodoc: options = args.last.is_a?(Hash) ? args.pop : {} - mode = (args.first || :sha).to_sym - "PluginAWeek::EncryptedStrings::#{mode.to_s.classify}Encryptor".constantize.new(options) + mode = (args.first || :sha).to_s.gsub(/(?:^|_)(.)/) {$1.upcase} + PluginAWeek::EncryptedStrings.const_get("#{mode}Encryptor").new(options) end end end end end