dry-logic
dry-logic copied to clipboard
Predicate logic with rule composition
PR for [issue 73](https://github.com/dry-rb/dry-logic/issues/73)
Fix: https://github.com/dry-rb/dry-logic/issues/92 I totally understand that this is a breaking API change but I figured it's worth a try.
This should fix the test errors with Ruby 3.0 ``` 1) predicates uri? [:http, :https] success behaves like predicate Failure/Error: uri_format = URI::DEFAULT_PARSER.make_regexp(schemes) NameError: uninitialized constant Dry::Logic::Predicates::Methods::URI ``` Please check...
`RuleInterpreter` takes string representations of rules, predicates or operations and parses them back to AST, which can be compiled to a rule object. So, it makes an ability to store...
* Valid when at least one rule is valid * Returns AST with all errors in case no rules are valid * Add visit_set and visit_part to Result One of...
## Describe the bug It's not my code breaking so I'm just describing it from the outside: ``` ~/gems/dry-logic-1.1.0/lib/dry/logic/predicates.rb:181:in `eql?': wrong number of arguments (given 1, expected 2) (ArgumentError) from...
As discussed in https://github.com/dry-rb/dry-logic/pull/55, its current name overrides `Object#respond_to?` in an incompatible fashion. We can rename it to `responds_to?`, for example. Just like `includes?` delegates to `include?`.
There are some things missing from the library that is really useful - [x] Predicates - [x] Operations - [ ] More examples
Hi, @solnic and I recently discussed the possibility of adding success feedback to the AST after calling an operation. I understand success is not currently returned as it will have...
Fix documentation: implication operation description