lib/sepa/attribute_checks.rb
def check_encryption_private_key
      return unless bank == :danske
      return if [:create_certificate, :get_bank_certificate].include? command

      rsa_key encryption_private_key

    rescue
      errors.add :encryption_private_key, ENCRYPTION_PRIVATE_KEY_ERROR_MESSAGE
    end
# Checks that {Client#encryption_private_key} can be initialized properly. Is only run if
# {Client#bank} is `:danske` and {Client#command} is not `:create_certificate` or
# `:get_bank_certificate`.
Checks that {Client#encryption_private_key} can be initialized properly.
Checks that { Client#encryption_private_key } can be initialized properly .
def check_encryption_private_key
      return unless bank == :danske
      return if [:create_certificate, :get_bank_certificate].include? command
      rsa_key encryption_private_key
    rescue
      errors.add :encryption_private_key, ENCRYPTION_PRIVATE_KEY_ERROR_MESSAGE
    end
def check_encryption_private_key return unless bank == :danske return if [ :create_certificate , :get_bank_certificate ] . include? command rsa_key encryption_private_key rescue errors . add :encryption_private_key , ENCRYPTION_PRIVATE_KEY_ERROR_MESSAGE end
Checks that {Client#encryption_private_key} can be initialized properly.
Checks that { Client#encryption_private_key } can be initialized properly .