ruleby 0.9.b1 → 0.9.b2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 = []
|