I'm currently learning to define yasnippets but there seems to be a use case that I can't figure out how to use. For example, let's say I want to define a ruby snippet that expands the key 'def' into a standard function definition. This is very easy to do but suppose I want to make the number of parameters of the generated function depend on the key, like if I expand the key 'def>n', I want a function defintion with n number of parameters. How would I accomplish this?
edit
Basically I want to make dynamics snippets that have behaviour that the HTML plugin Emmet possesses. Just as in how the following abbrev 'p*3>div*2' with Emmet creates 3 pairs of p tags with two div pairs within each, I would like it to be possible to make 'def*3>2' to generate 3 function definitions with 2 arguments each. That's just an example but basically I want quantifier and nesting properties.