module Ribbon::EncryptedStore::Mixins::ActiveRecordMixin::ClassMethods
Public Instance Methods
_encrypted_store_data()
click to toggle source
# File lib/ribbon/encrypted_store/mixins/active_record_mixin.rb, line 32 def _encrypted_store_data @_encrypted_store_data ||= {} end
attr_encrypted(*args)
click to toggle source
# File lib/ribbon/encrypted_store/mixins/active_record_mixin.rb, line 36 def attr_encrypted(*args) # Store attrs in class data _encrypted_store_data[:encrypted_attributes] = args.map(&:to_sym) args.each { |arg| define_method(arg) { _encrypted_store_get(arg) } define_method("#{arg}=") { |value| _encrypted_store_set(arg, value) } } end