3 ms·
Because you know, your "example" YAML parsing is useless in and of itself, it doesn't result in a working ruleset, you skipped the whole part where you
by djacobs 16y ago
Because you know, your "example" YAML parsing is
useless in and of itself, it doesn't result in a
working ruleset, you skipped the whole part where you
feed that data to your code and setup the stuff
that actually does work.
Sorry, but that's not actually the case, is it? There is no "business logic" in his example. To actually use the config system he's set up, you need to evaluate Rule#charge for every rule you want to evaluate. In my example, all you could run allowed.include? or simply iterate over the allowed array.