Does the Ruby Mustache API have a way to return the key names from a template?
Take, for example:
require 'mustache'
m = Mustache.new
m.template = "Hello {{first_name}} {{last_name}}"
I want to make an API call — but I don’t know what it is — that returns the key names:
[:first_name, :last_name]
or something similar.
There isn’t a way specifically to do that, but as a start you might consider the following:
It should be fairly easy to write a traversal that extracted the relevant keys.