Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Addressable::Template: Substitution with something that is not a Hash #133
I'm trying to replace my ad-hoc URI-Template parser with Addressable::Template.
However, I don't have the substitutions in Hash form. The current Template implementation assumes that substitutions are Enumerable (it calls
Not calling inject makes it possible to pass a lambda (or anything else that responds to
Ideally I'd like to change expand to take a block like so:
but I'd like to hear what you think about changing the API in that way.
I like this idea, but I'd like to see documentation updated for the methods that would start accepting anything that responds to