ruleby 0.9.b3 → 0.9.b4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/dsl/ferrari.rb +12 -5
- metadata +2 -2
data/lib/dsl/ferrari.rb
CHANGED
@@ -115,9 +115,7 @@ module Ruleby
|
|
115
115
|
each do |c|
|
116
116
|
child_patterns = c.flatten_patterns
|
117
117
|
if child_patterns.or? and child_patterns.size > 1
|
118
|
-
|
119
|
-
or_patterns << o
|
120
|
-
end
|
118
|
+
or_patterns << child_patterns
|
121
119
|
else
|
122
120
|
patterns.push(*child_patterns)
|
123
121
|
end
|
@@ -127,9 +125,18 @@ module Ruleby
|
|
127
125
|
flat.push(*patterns)
|
128
126
|
else
|
129
127
|
flat = Container.new(:or)
|
130
|
-
|
128
|
+
|
129
|
+
x = or_patterns[1..-1]
|
130
|
+
if x.empty?
|
131
|
+
or_pattern_products = or_patterns[0].product()
|
132
|
+
else
|
133
|
+
or_pattern_products = or_patterns[0].product(*x)
|
134
|
+
end
|
135
|
+
|
136
|
+
or_pattern_products.each do |op|
|
131
137
|
c = Container.new(:and)
|
132
|
-
c.push(
|
138
|
+
c.push(*patterns)
|
139
|
+
c.push(*op)
|
133
140
|
flat << c
|
134
141
|
end
|
135
142
|
end
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: ruleby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease: 4
|
5
|
-
version: 0.9.
|
5
|
+
version: 0.9.b4
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Joe Kutner
|
@@ -11,7 +11,7 @@ autorequire:
|
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
13
|
|
14
|
-
date: 2011-06-
|
14
|
+
date: 2011-06-27 00:00:00 -05:00
|
15
15
|
default_executable:
|
16
16
|
dependencies: []
|
17
17
|
|