lib/symmetric_encryption.rb in symmetric-encryption-0.9.0 vs lib/symmetric_encryption.rb in symmetric-encryption-0.9.1
- old
+ new
@@ -1,10 +1,13 @@
+require 'zlib'
require 'symmetric_encryption/version'
require 'symmetric_encryption/cipher'
require 'symmetric_encryption/symmetric_encryption'
-require 'symmetric_encryption/reader'
-require 'symmetric_encryption/writer'
-require 'zlib'
+
+module SymmetricEncryption
+ autoload :Reader, 'symmetric_encryption/reader'
+ autoload :Writer, 'symmetric_encryption/writer'
+end
if defined?(Rails)
require 'symmetric_encryption/railtie'
end
# attr_encrypted and Encrypted validator
if defined?(ActiveRecord::Base)