# File lib/active_crypto.rb, line 52 def encrypt(*attributes) include ActiveCrypto::Encrypted before_save :encrypt_attributes after_save :decrypt_attributes options=attributes.last.is_a?(Hash) ? attributes.pop : {} keyholder if options and options[:key] module_eval "def session_key\n(send :\#{options[:key]} ).send :session_key\nend\n@@external_key=true\n" end base64_encode = (options and options[:base64]) module_eval "def self.ezcrypto_base64?\n\#{base64_encode.to_s}\nend\n" self.encrypted_attributes=attributes end