Class: Identified::SerialNumber

Inherits:
Fixnum
  • Object
show all
Defined in:
lib/identified/ssn/serial_number.rb

Overview

Represents the serial number of an SSN and performs simple validation.

Instance Method Summary collapse

Instance Method Details

#valid?Boolean

All non-zero serial numbers are valid regardless of when the ssn was issued. See www.ssa.gov/history/ssn/geocard.html

Returns:

  • (Boolean)


6
7
8
# File 'lib/identified/ssn/serial_number.rb', line 6

def valid?
  (1..9999).include?(self)
end