queirozfcom / rachinations

Other
2 stars 0 forks source link

Improve hash_init module so as to accept definite options #50

Closed queirozfcom closed 9 years ago

queirozfcom commented 10 years ago

Module HashInit could support a predefined range of values for each option.

For example, if I'm using this module to instantiate a class :clap:, I would also like to say that option foo should only accept values "bar"and "baz". Anything different from that should trigger an error.

This should help make sure that our objects get created correctly and also reduce the amount of boilerplate code in the classes themselves (testing whether an option is set, checking whether it has the right types and so on.)

queirozfcom commented 9 years ago

This should be postponed because I'll place this behaviour in the DSL Parser instead.