-
-
Notifications
You must be signed in to change notification settings - Fork 190
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add key.success? and key.failure? predicates #615
Comments
If it's ok, I'll give a try to it. |
Sure. |
Hmmm this seems tricky... it implies changing the architecture so that the evaluator and failures for every key are shared between all rules. Am I wrong? |
For me, it would be enough to work only within a single rule run. Though I can see how it can be not immediately obvious. @solnic any thoughts? |
|
Probably |
I forgot we have rule(:foo) do
error? # expands to `error?("foo")`
error?("other.path") # if you need to check something else
end I think this should be enough and we don't need |
works for me though |
@flash-gordon why? |
@solnic rules can be quite convoluted, especially in macros. This is the exact need I had when filed this issue. Keeping them simple is not always feasible. |
@flash-gordon ok makes sense |
@waiting-for-dev so I think adding a default argument to |
In complex rules, it may be useful to know whether the key has any failure message already.
The text was updated successfully, but these errors were encountered: