Class: Class

Inherits:
Object
  • Object
show all
Defined in:
lib/encryptedattributes.rb

Instance Method Summary collapse

Instance Method Details

#attr_encrypted(*attrs) ⇒ Object

Add the attr_encrypted command to Class so new classes can use it



162
163
164
165
166
167
168
# File 'lib/encryptedattributes.rb', line 162

def attr_encrypted(*attrs)
  self.extend(EncryptedAttributes::ClassMethods)
  send(:encrypted_attributes=, attrs)
  instance_eval do
    send(:include, EncryptedAttributes::InstanceMethods)
  end
end