Module: Paf::CoreExt::String

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

Overview

Extend the core String class with PAF specific processing

Instance Method Summary collapse

Instance Method Details

#paf_exception?Boolean



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

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

#paf_split_exception?Boolean



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

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