Enumerator for Hash

R

Ryan Hinton

I have a complex object that I want to hash in different ways, similar
to the way Enumerator allows for iterating using something besides
#each. For one Hash I can use the #hash method for indexing, but for
another hash I want to use some other method. I cannot find an easy
way to do this.

Any suggestions?
 
R

Robert Klemme

I have a complex object that I want to hash in different ways,

You write "hash" which usually means "calculate hash value for" but the
following text seems to indicate that you want to iterate.
similar
to the way Enumerator allows for iterating using something besides
#each. For one Hash I can use the #hash method for indexing,

Now you mention "indexing" and #hash method in one sentence.
but for
another hash I want to use some other method. I cannot find an easy
way to do this.

Frankly, I am at a loss here. What do you want? (I have some possible
questions in mind but I'd rather hear it from you.)
Any suggestions?

Make clear what you actually want. You could also show some code.

Kind regards

robert
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top