csv_decision 0.5.0 → 0.5.1
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/csv_decision.gemspec +1 -1
- data/lib/csv_decision/scan.rb +2 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eb3dff1dad1cc2af4ddb29fd70e6a6c9e0a938de
|
4
|
+
data.tar.gz: b0f97ed7f6f0710ae21dfc68d2e2096ffc08ffc6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 51f99fa32d541200a4f00f75973a4197fec8c1f6f8578dfc6fcaf6b52eb5017c8f69f72637435ad318f0ce306163ac8b08c402654dd68ce10413ce36e703b06a
|
7
|
+
data.tar.gz: b1d4b16f56394974959c629879a299d2fdbf873eef85d3c46e53aa8841f345a091c68a376fef03bae06a0d1c2ee4351d5404f80ff337e48e99cf1809f75dbf31
|
data/CHANGELOG.md
CHANGED
data/csv_decision.gemspec
CHANGED
@@ -5,7 +5,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = 'csv_decision'
|
8
|
-
spec.version = '0.5.
|
8
|
+
spec.version = '0.5.1'
|
9
9
|
spec.authors = ['Brett Vickers']
|
10
10
|
spec.email = ['brett@phillips-vickers.com']
|
11
11
|
spec.description = 'CSV based Ruby decision tables.'
|
data/lib/csv_decision/scan.rb
CHANGED
@@ -32,10 +32,11 @@ module CSVDecision
|
|
32
32
|
data = input_hashes.data(decision: decision, path: path, input: input)
|
33
33
|
next if data == {}
|
34
34
|
|
35
|
+
# Note that +rows+ must be enclosed in an array for this method to work.
|
35
36
|
result = decision.index_scan_first_match(
|
36
37
|
scan_cols: data[:scan_cols],
|
37
38
|
hash: data[:hash],
|
38
|
-
index_rows:
|
39
|
+
index_rows: [rows]
|
39
40
|
)
|
40
41
|
return result if result != {}
|
41
42
|
end
|