Permalink
Browse files

Make Reader and Writer load on demand

  • Loading branch information...
1 parent 194a8a3 commit bc086b03bf8f14417f2bfe6aad3f1f81946c7483 @reidmorrison reidmorrison committed Oct 8, 2012
Showing with 6 additions and 3 deletions.
  1. +6 −3 lib/symmetric_encryption.rb
@@ -1,9 +1,12 @@
+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

0 comments on commit bc086b0

Please sign in to comment.