lib/attr_encrypted.rb in shuber-attr_encrypted-1.0.3 vs lib/attr_encrypted.rb in shuber-attr_encrypted-1.0.4
- old
+ new
@@ -1,15 +1,7 @@
require 'huberry/attr_encrypted/class'
Class.send :include, Huberry::AttrEncrypted::Class
require 'huberry/attr_encrypted/object'
-Object.send :include, Huberry::AttrEncrypted::Object
+Object.extend Huberry::AttrEncrypted::Object
-if defined?(ActiveRecord)
- require 'huberry/attr_encrypted/active_record'
- ActiveRecord::Base.extend Huberry::AttrEncrypted::ActiveRecord
-end
-
-if defined?(DataMapper)
- require 'huberry/attr_encrypted/data_mapper'
- DataMapper::Resource.send :include, Huberry::AttrEncrypted::DataMapper
-end
+Dir[File.join(File.dirname(__FILE__), 'huberry', 'attr_encrypted', 'adapters', '*.rb')].each { |file| require file }
\ No newline at end of file