class Contracts::IdentifierArg
Public Class Methods
to_s()
click to toggle source
# File lib/custom_contracts.rb, line 59 def self.to_s 'must be a String between 1 and 16 characters in length limited to [a-z, A-Z, -, _, .]' end
valid?(val)
click to toggle source
# File lib/custom_contracts.rb, line 53 def self.valid? val val.is_a?(String) && val.length.between?(1,16) && val =~ /^[a-zA-Z0-9\-\_\.]*$/i end