Module: AttrCipher::ClassMethods

Defined in:
lib/attr_cipher/attr_cipher.rb

Instance Method Summary collapse

Instance Method Details

#attr_cipher(*args, secret: AttrCipher.secret, cipher: AttrCipher.cipher) ⇒ Object



30
31
32
33
34
35
# File 'lib/attr_cipher/attr_cipher.rb', line 30

def attr_cipher(*args, secret: AttrCipher.secret, cipher: AttrCipher.cipher)
  AttrCipher.validate_secret(secret)
  args.each do |attribute|
    define_cipher_attribute(attribute, secret, cipher)
  end
end