Module: Ribbon::EncryptedStore

Defined in:
lib/ribbon/encrypted_store.rb,
lib/ribbon/encrypted_store/errors.rb,
lib/ribbon/encrypted_store/mixins.rb,
lib/ribbon/encrypted_store/railtie.rb,
lib/ribbon/encrypted_store/version.rb,
lib/ribbon/encrypted_store/instance.rb,
lib/ribbon/encrypted_store/crypto_hash.rb,
lib/ribbon/encrypted_store/mixins/active_record_mixin.rb,
lib/generators/encrypted_store/install/install_generator.rb,
lib/generators/encrypted_store/encrypt_table/encrypt_table_generator.rb,
lib/ribbon/encrypted_store/mixins/active_record_mixin/encryption_key.rb,
lib/ribbon/encrypted_store/mixins/active_record_mixin/encryption_key_salt.rb,
lib/generators/encrypted_store/upgrade/ZeroOneFive/zero_one_five_generator.rb

Defined Under Namespace

Modules: Errors, Generators, Mixins Classes: CryptoHash, Instance, Railtie

Constant Summary collapse

VERSION =
'0.2.0'

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



13
14
15
16
17
18
19
# File 'lib/ribbon/encrypted_store.rb', line 13

def included(base)
  if defined?(ActiveRecord) && base < ActiveRecord::Base
    base.send(:include, Mixins::ActiveRecordMixin)
  else
    raise Errors::UnsupportedModelError
  end
end

.instanceObject



25
26
27
# File 'lib/ribbon/encrypted_store.rb', line 25

def instance
  @__instance ||= Instance.new
end

.method_missing(meth, *args, &block) ⇒ Object



21
22
23
# File 'lib/ribbon/encrypted_store.rb', line 21

def method_missing(meth, *args, &block)
  instance.send(meth, *args, &block)
end