module RailsCredentialsCustomKey

Constants

VERSION

Attributes

custom[RW]

Public Class Methods

init!(&block) click to toggle source
# File lib/rails_credentials_custom_key.rb, line 14
def init!(&block)
  return unless required?
  raise ArgumentError, "no block given" if block.nil?

  self.custom = block
  ActiveSupport::EncryptedFile.prepend(EncryptedFileExtention)
end
required?() click to toggle source
# File lib/rails_credentials_custom_key.rb, line 9
def required?
  Rails.const_defined?(:Command) &&
    Rails::Command.const_defined?(:CredentialsCommand)
end