module Ork::Encryption
Constants
- VERSION
Public Class Methods
encryption_config(config = nil)
click to toggle source
Accessor for the general Encryptor config.
config - When nil, it acts like a reader.
When hash, it needs :key and :cipher
Raises Ork::Encryption::MissingConfig
when the config is incomplete.
# File lib/ork/encryption.rb, line 30 def self.encryption_config(config = nil) return @encryption_config if config.nil? Ork::Encryption::Cipher.validate_config @encryption_config = config end
included(klass)
click to toggle source
# File lib/ork/encryption.rb, line 8 def self.included(klass) raise Ork::NotOrkObject unless klass.included_modules.include? Ork::Document klass.content_type Serializers::Json.content_type end
init(config)
click to toggle source
Initializes the module, setting a configuration and registering the serializers into Riak API.
# File lib/ork/encryption.rb, line 17 def self.init(config) Serializers::Json.register! encryption_config config end