Micha El
Micha El

Reputation: 73

Storing a block in a variable with changing number of parameters

I encountered a problem or maybe its me just not knowing the appropriate way:

One of my objects is initialized with a block. Depending on the context, the block definition changes, which means, the number of parameters is not fixed and may change between f.e. between 2 and 6.

How do I set up a variable to store the block in or do I have to set up multiple variables, which I don't really want to? Is there something like "wildcarding"?

Upvotes: 0

Views: 82

Answers (1)

Rui Peres
Rui Peres

Reputation: 25917

As it helped you and in order for you to close the question:

You can pass a Dictionary and inside specify the values.

Upvotes: 1

Related Questions