Closed jhirn closed 1 year ago
If it's wanted. I can try to put up a PR for this.
Hey!
We already create predicate methods when the default value is true
or false
(so, in you case enabled: true
will ad the #enabled?
) method: https://github.com/palkan/anyway_config/blob/83d79ccaf5619889c07c8ecdf8d66dcb22c9dc05/lib/anyway/config.rb#L105-L108
Anyway, I think, taking defined corrections into account also makes sense, so I'm open for a PR
Oh nice. Yeah I'm assuming that may not work for ENVs?
coerce_types
is the final say in the type so adding it there would be a nice addition. As soon as I'm done converting this 6yr old legacy app to AnywayConfig I'll take a stab at a PR.
Thank you!
Given a config with a coerced boolean, it would be really nice to have predicate methods generated automatically. I'm thinking this is something that you might want to disable rather than opt-in to, but I'd be fine with either way.