Method: Dnsruby::CodeMapper.regexp
- Defined in:
- lib/dnsruby/code_mapper.rb
.regexp ⇒ Object
Return a regular expression which matches any codes or strings from the CodeMapper.
174 175 176 177 |
# File 'lib/dnsruby/code_mapper.rb', line 174 def self.regexp # Longest ones go first, so the regex engine will match AAAA before A, etc. return @@arrays[self].strings.keys.sort { |a, b| b.length <=> a.length }.join('|') end |