18F/identity-idp

View on GitHub
app/services/idv/in_person/enrollment_code_formatter.rb

Summary

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

module Idv
  module InPerson
    class EnrollmentCodeFormatter
      def self.format(code)
        code.gsub(/(\d{4})/, '\1-').chomp('-')
      end
    end
  end
end