Class: Net::DNS::Question

Inherits:
Object
  • Object
show all
Defined in:
lib/domain-probe/resolver_patch.rb

Overview

to support *

Instance Method Summary collapse

Instance Method Details

#check_name(name) ⇒ Object



26
27
28
29
30
31
32
33
34
35
# File 'lib/domain-probe/resolver_patch.rb', line 26

def check_name(name)
  name.strip!
  if name =~ /[^\w\.\-_\*]/
    raise NameError, "Question name #{name.inspect} not valid"          
  else
    name
  end
rescue
  raise NameError, "Question name #{name.inspect} not valid"                  
end