allow to specify method name which will return hash representation of
 object