You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We had a discussion about the Twingly::URL::Hasher discussions today. What we want to do is to remove the helper functions:
Twingly::URL::Hasher.taskdb_hash(url)
Twingly::URL::Hasher.blogstream_hash(url)
Twingly::URL::Hasher.documentdb_hash(url)
Twingly::URL::Hasher.autopingdb_hash(url)
Since we only use the hash with Twingly::URL objects we should introduce these functions as instance methods to Twingly::URL instead. I would prefer if we allowed one method (documentdb_hash) to be the default go to hash algorithm and call it to_hash as well, in the long run we should avoid using different hash implementations.
The text was updated successfully, but these errors were encountered:
I think we could stuff the methods into the utilities class instead, but other than that I don't mind how things currently look.
I don't mind the idea of putting the hasher methods on the URL objects, my only objection is that Zambezi would have to parse every string (i.e. convert to a Twingly::URL) before it can hash it, I know it's a slow process :)
We had a discussion about the
Twingly::URL::Hasher
discussions today. What we want to do is to remove the helper functions:Twingly::URL::Hasher.taskdb_hash(url)
Twingly::URL::Hasher.blogstream_hash(url)
Twingly::URL::Hasher.documentdb_hash(url)
Twingly::URL::Hasher.autopingdb_hash(url)
Since we only use the hash with
Twingly::URL
objects we should introduce these functions as instance methods toTwingly::URL
instead. I would prefer if we allowed one method (documentdb_hash
) to be the default go to hash algorithm and call itto_hash
as well, in the long run we should avoid using different hash implementations.The text was updated successfully, but these errors were encountered: