Module: Utilities::Logic
- Defined in:
- lib/utilities/logic.rb
Class Method Summary collapse
Class Method Details
.or_queries(expression) ⇒ Array
20 21 22 |
# File 'lib/utilities/logic.rb', line 20 def self.or_queries(expression) parse_logic(expression).split('+') end |
.parse_logic(expression) ⇒ String
12 13 14 15 16 |
# File 'lib/utilities/logic.rb', line 12 def self.parse_logic(expression) parsed = string2logic(expression) simple = parsed.simplify simple.sort.to_s end |