just a few nitpicks

changed if_dns to is_dns so the code reads more smoothly
returned nil when something failed
changed if statement to 'if not @is_dns and hash' near end of run