Module: Paf::Premises::String

Defined in:
lib/paf/premises/string.rb

Overview

Extend the core String class with PAF specific processing

Instance Method Summary collapse

Instance Method Details

#paf_exception?Boolean

Returns:

  • (Boolean)


5
6
7
# File 'lib/paf/premises/string.rb', line 5

def paf_exception?
  !/^(.|[\d][[:alpha:]]|[\d].*?[\d][[:alpha:]]?)$/.match(self).nil?
end

#paf_split_exception?Boolean

Returns:

  • (Boolean)


9
10
11
# File 'lib/paf/premises/string.rb', line 9

def paf_split_exception?
  paf_exception? && /^\d+$/.match(self).nil?
end