Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: 085cea0e05
Fetching contributors…

Cannot retrieve contributors at this time

26 lines (20 sloc) 0.749 kB
Rules Engine of MOSTFIT
-----------------------
It consists of
1) Main Files - lib/rules.rb
2) View - app/views/rules/
3) Controller - app/controllers/rules.rb
4) Model - app/models/rule.rb
This rule engine can handle multiple conditions (connected with and/or) simultaneusly and since the rules are compiled to respective models (using validates_with_method of datamapper), it produces
lowest overheads.
The rules can be manipulated in run-time without re-booting the server.
Internals
---------
Internally, the rules engine uses BasicCondition(B) class (in lib/rules.rb) to represent a simple condition(S), a complex condition(C1) is either
C1 = [:not, C2]
or
C1 = [:and, C2, C3]
or
C1 = [:or. C2, C3]
or
C1 = [is_basic_condition = true, B]
Jump to Line
Something went wrong with that request. Please try again.