18F/identity-idp

View on GitHub
app/services/forbidden_passwords.rb

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
# frozen_string_literal: true

class ForbiddenPasswords
  def initialize(email)
    @email = email
  end

  def call
    [email, split_email(email), APP_NAME].flatten unless email.nil?
  end

  private

  attr_reader :email

  def split_email(email_address)
    email_address.split(/[[:^word:]_]/)
  end
end