Module: ActiveRecordEncryption::Encryptor

Defined in:
lib/active_record_encryption/encryptor.rb,
lib/active_record_encryption/encryptor/raw.rb,
lib/active_record_encryption/encryptor/base.rb,
lib/active_record_encryption/encryptor/registry.rb,
lib/active_record_encryption/encryptor/aes_256_cbc.rb,
lib/active_record_encryption/encryptor/active_support.rb

Defined Under Namespace

Classes: ActiveSupport, Aes256Cbc, Base, Raw, Registration, Registry

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.registryObject (readonly)

Returns the value of attribute registry.



14
15
16
# File 'lib/active_record_encryption/encryptor.rb', line 14

def registry
  @registry
end

Class Method Details

.lookup(*args, **kwargs) ⇒ Object



21
22
23
# File 'lib/active_record_encryption/encryptor.rb', line 21

def lookup(*args, **kwargs)
  registry.lookup(*args, **kwargs)
end

.register(type_name, klass = nil, **options, &block) ⇒ Object

Add a new type to the registry, allowing it to be gotten through ActiveRecordEncryption::Type#lookup



17
18
19
# File 'lib/active_record_encryption/encryptor.rb', line 17

def register(type_name, klass = nil, **options, &block)
  registry.register(type_name, klass, **options, &block)
end