add hostname_method as a attribute
skip the hostname_method if nil?
Merge pull request #13 from jhulten/t_hostname_method

add hostname_method as a attribute