For example, say I want to do this:
{
:mytime => times[:mytime]
}
There is a bit of repetition here, is it possible to just do something like { :mytime => times[$_key] } (made up syntax)?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The short answer is: no, there’s no syntax that does anything like that. Without more context about what you’re actually trying to do, there isn’t really a good longer answer. Still, I’ll try to be a little more useful. If you’re really worried about repetition, you could do something like:
For only a few keys, I can’t see that being worth it, personally.