ruleby 0.9.b1 → 0.9.b2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/dsl/ferrari.rb +10 -2
- metadata +1 -1
data/lib/dsl/ferrari.rb
CHANGED
@@ -96,10 +96,18 @@ module Ruleby
|
|
96
96
|
if or?
|
97
97
|
patterns = []
|
98
98
|
each do |c|
|
99
|
-
c.flatten_patterns
|
100
|
-
|
99
|
+
f = c.flatten_patterns
|
100
|
+
if f.and?
|
101
|
+
patterns << f
|
102
|
+
else
|
103
|
+
f.each do |o|
|
104
|
+
# i hope this is safe... not entirely sure
|
105
|
+
patterns << (o.size == 1 ? o.first : o)
|
106
|
+
# patterns << o
|
107
|
+
end
|
101
108
|
end
|
102
109
|
end
|
110
|
+
|
103
111
|
Container.new(:or, *patterns)
|
104
112
|
elsif and?
|
105
113
|
patterns = []
|