Sha256: 969864060ad3d5ce23ecfd2096c51634fc54ef783b3bdc23a5487cf13b36060a
Contents?: true
Size: 521 Bytes
Versions: 2
Compression:
Stored size: 521 Bytes
Contents
class Lockbox class Utils def self.build_box(context, options) options = options.dup options.each do |k, v| if v.is_a?(Proc) options[k] = context.instance_exec(&v) if v.respond_to?(:call) elsif v.is_a?(Symbol) options[k] = context.send(v) end end Lockbox.new(options) end def self.encrypted_options(record, name) record.class.respond_to?(:encrypted_attachments) && record.class.encrypted_attachments[name.to_sym] end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
lockbox-0.1.1 | lib/lockbox/utils.rb |
lockbox-0.1.0 | lib/lockbox/utils.rb |