Aristotle – Ruby business logic engine, inspired by Cucumber
github.com
github.com
And if the goal is to provide business rules documentation for nontechnical users, why not just comment your code and make an RDoc? I'm not sure I fully understand what Aristotle buys you over this:
#Move to 'to_do' if the last message changed and is unverified
request.state = :to_do if request.last_message_id_changed? && request.state != :to_do && !request.last_message.try(:sent?)In this case, its benefits are that the logic is stated in natural language, in domain terms, so it could be written and/or reviewed by domain experts or business analysts. It's basically a very simple business rule engine. It's similar in this way to Cucumber, except that this is specifying production logic instead of test cases.
It's also just text so the logic could also be updated by users at run-time, making the system scriptable, if you need that kind of reconfigurability.
However I think that if overused, this not only makes your system slow due to excessive string-comparing, it also leads to a potentially awful antipattern that I'm all too familiar with from my own experiences in enterprise software dev.
Add a few more features to this Aristotle language, and pretty soon you may have just invented yourself an ad-hoc, informally-specified, bug-ridden, slow implementation of a new programming language.
http://thedailywtf.com/articles/The_Enterprise_Rules_Engine
http://en.wikipedia.org/wiki/Inner-platform_effect
http://en.wikipedia.org/wiki/Greenspun%27s_tenth_rule
If you really need configurable rules in a rails app though, I'd think it would be faster and more maintainable to just create a DSL within Ruby code rather than parsing a text file. Then you could use the if-this-then-that type business logic syntax but still have it be legal Ruby code and get all the tooling support that comes with it.
2) Nontechnical users will never read RDoc type code. They want things in plain English in the admin area where they do their work. I'm not sure which RDoc integration would provide that.