Class: OSU::Emplid
- Inherits:
-
Object
- Object
- OSU::Emplid
- Defined in:
- lib/osu/emplid.rb
Overview
Validates an osu emplid.
Constant Summary collapse
- VALID_EMPLID =
a valid emplid is an 8-9 digit string
/\A\d{8,9}\z/
Class Method Summary collapse
-
.valid?(emplid) ⇒ Boolean
Returns true if the emplid is valid.
Class Method Details
.valid?(emplid) ⇒ Boolean
Returns true if the emplid is valid.
8 9 10 11 12 13 |
# File 'lib/osu/emplid.rb', line 8 def self.valid?(emplid) case emplid when VALID_EMPLID then true else false end end |