csv_decision2 0.5.1 → 0.5.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (102) hide show
  1. checksums.yaml +4 -4
  2. data/Dockerfile +1 -1
  3. data/README.md +16 -16
  4. data/benchmarks/rufus_decision.rb +5 -7
  5. data/csv_decision2.gemspec +2 -2
  6. data/doc/CSVDecision/CellValidationError.html +117 -110
  7. data/doc/CSVDecision/Columns/Default.html +537 -508
  8. data/doc/CSVDecision/Columns/Dictionary.html +729 -686
  9. data/doc/CSVDecision/Columns/Entry.html +457 -433
  10. data/doc/CSVDecision/Columns.html +1134 -1051
  11. data/doc/CSVDecision/Constant.html +205 -191
  12. data/doc/CSVDecision/Data.html +423 -398
  13. data/doc/CSVDecision/Decide.html +236 -225
  14. data/doc/CSVDecision/Decision.html +872 -825
  15. data/doc/CSVDecision/Defaults.html +243 -230
  16. data/doc/CSVDecision/Dictionary/Entry.html +1026 -964
  17. data/doc/CSVDecision/Dictionary.html +377 -355
  18. data/doc/CSVDecision/Error.html +116 -105
  19. data/doc/CSVDecision/FileError.html +117 -110
  20. data/doc/CSVDecision/Function.html +181 -168
  21. data/doc/CSVDecision/Guard.html +200 -185
  22. data/doc/CSVDecision/Header.html +557 -523
  23. data/doc/CSVDecision/Index.html +652 -617
  24. data/doc/CSVDecision/Input.html +329 -312
  25. data/doc/CSVDecision/Load.html +232 -220
  26. data/doc/CSVDecision/Matchers/Constant.html +432 -399
  27. data/doc/CSVDecision/Matchers/Function.html +451 -415
  28. data/doc/CSVDecision/Matchers/Guard.html +459 -424
  29. data/doc/CSVDecision/Matchers/Matcher.html +470 -426
  30. data/doc/CSVDecision/Matchers/Numeric.html +375 -346
  31. data/doc/CSVDecision/Matchers/Pattern.html +429 -396
  32. data/doc/CSVDecision/Matchers/Proc.html +617 -575
  33. data/doc/CSVDecision/Matchers/Range.html +331 -302
  34. data/doc/CSVDecision/Matchers/Symbol.html +386 -353
  35. data/doc/CSVDecision/Matchers.html +1509 -1393
  36. data/doc/CSVDecision/Numeric.html +201 -188
  37. data/doc/CSVDecision/Options.html +376 -357
  38. data/doc/CSVDecision/Parse.html +217 -204
  39. data/doc/CSVDecision/Paths.html +664 -629
  40. data/doc/CSVDecision/Result.html +1076 -1005
  41. data/doc/CSVDecision/Scan/InputHashes.html +305 -288
  42. data/doc/CSVDecision/Scan.html +262 -249
  43. data/doc/CSVDecision/ScanRow.html +749 -705
  44. data/doc/CSVDecision/Symbol.html +204 -191
  45. data/doc/CSVDecision/Table.html +1391 -1305
  46. data/doc/CSVDecision/TableValidationError.html +117 -110
  47. data/doc/CSVDecision/Validate.html +353 -337
  48. data/doc/CSVDecision.html +623 -552
  49. data/doc/_index.html +488 -448
  50. data/doc/class_list.html +250 -45
  51. data/doc/file.README.html +304 -278
  52. data/doc/index.html +304 -278
  53. data/doc/method_list.html +1159 -1017
  54. data/doc/top-level-namespace.html +79 -75
  55. data/lib/{csv_decision → csv_decision2}/columns.rb +7 -7
  56. data/lib/{csv_decision → csv_decision2}/data.rb +1 -1
  57. data/lib/{csv_decision → csv_decision2}/decision.rb +5 -5
  58. data/lib/{csv_decision → csv_decision2}/defaults.rb +2 -2
  59. data/lib/{csv_decision → csv_decision2}/dictionary.rb +2 -2
  60. data/lib/{csv_decision → csv_decision2}/header.rb +5 -5
  61. data/lib/{csv_decision → csv_decision2}/index.rb +5 -5
  62. data/lib/{csv_decision → csv_decision2}/input.rb +3 -3
  63. data/lib/{csv_decision → csv_decision2}/load.rb +6 -6
  64. data/lib/{csv_decision → csv_decision2}/matchers/constant.rb +2 -2
  65. data/lib/{csv_decision → csv_decision2}/matchers/function.rb +2 -2
  66. data/lib/{csv_decision → csv_decision2}/matchers/guard.rb +2 -2
  67. data/lib/{csv_decision → csv_decision2}/matchers/numeric.rb +2 -2
  68. data/lib/{csv_decision → csv_decision2}/matchers/pattern.rb +2 -2
  69. data/lib/{csv_decision → csv_decision2}/matchers/range.rb +2 -2
  70. data/lib/{csv_decision → csv_decision2}/matchers/symbol.rb +2 -2
  71. data/lib/{csv_decision → csv_decision2}/matchers.rb +5 -5
  72. data/lib/{csv_decision → csv_decision2}/options.rb +3 -3
  73. data/lib/{csv_decision → csv_decision2}/parse.rb +14 -14
  74. data/lib/{csv_decision → csv_decision2}/paths.rb +5 -5
  75. data/lib/{csv_decision → csv_decision2}/result.rb +2 -2
  76. data/lib/{csv_decision → csv_decision2}/scan.rb +3 -3
  77. data/lib/{csv_decision → csv_decision2}/scan_row.rb +2 -2
  78. data/lib/{csv_decision → csv_decision2}/table.rb +8 -8
  79. data/lib/{csv_decision → csv_decision2}/validate.rb +2 -2
  80. data/lib/csv_decision2.rb +45 -0
  81. data/spec/{csv_decision → csv_decision2}/columns_spec.rb +44 -44
  82. data/spec/{csv_decision → csv_decision2}/constant_spec.rb +4 -4
  83. data/spec/{csv_decision → csv_decision2}/data_spec.rb +11 -11
  84. data/spec/{csv_decision → csv_decision2}/decision_spec.rb +6 -6
  85. data/spec/{csv_decision → csv_decision2}/examples_spec.rb +14 -14
  86. data/spec/{csv_decision → csv_decision2}/index_spec.rb +8 -8
  87. data/spec/{csv_decision → csv_decision2}/input_spec.rb +9 -9
  88. data/spec/{csv_decision → csv_decision2}/load_spec.rb +8 -8
  89. data/spec/{csv_decision → csv_decision2}/matchers/function_spec.rb +7 -7
  90. data/spec/{csv_decision → csv_decision2}/matchers/guard_spec.rb +14 -14
  91. data/spec/{csv_decision → csv_decision2}/matchers/numeric_spec.rb +5 -5
  92. data/spec/{csv_decision → csv_decision2}/matchers/pattern_spec.rb +6 -6
  93. data/spec/{csv_decision → csv_decision2}/matchers/range_spec.rb +5 -5
  94. data/spec/{csv_decision → csv_decision2}/matchers/symbol_spec.rb +6 -6
  95. data/spec/{csv_decision → csv_decision2}/options_spec.rb +18 -18
  96. data/spec/csv_decision2/parse_spec.rb +44 -0
  97. data/spec/{csv_decision → csv_decision2}/table_spec.rb +17 -17
  98. data/spec/csv_decision2_spec.rb +7 -0
  99. metadata +64 -64
  100. data/lib/csv_decision.rb +0 -45
  101. data/spec/csv_decision/parse_spec.rb +0 -44
  102. data/spec/csv_decision_spec.rb +0 -7
@@ -1,23 +1,24 @@
1
1
  <!DOCTYPE html>
2
2
  <html>
3
- <head>
4
- <meta charset="utf-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>
7
- Top Level Namespace
8
-
3
+
4
+ <head>
5
+ <meta charset="utf-8">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+ <title>
8
+ Top Level Namespace
9
+
9
10
  &mdash; Documentation by YARD 0.9.12
10
-
11
- </title>
11
+
12
+ </title>
12
13
 
13
14
  <link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
14
15
 
15
16
  <link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
16
17
 
17
- <script type="text/javascript" charset="utf-8">
18
- pathId = "";
19
- relpath = '';
20
- </script>
18
+ <script type="text/javascript" charset="utf-8">
19
+ pathId = "";
20
+ relpath = '';
21
+ </script>
21
22
 
22
23
 
23
24
  <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
@@ -25,71 +26,71 @@
25
26
  <script type="text/javascript" charset="utf-8" src="js/app.js"></script>
26
27
 
27
28
 
28
- </head>
29
- <body>
30
- <div class="nav_wrap">
31
- <iframe id="nav" src="class_list.html?1"></iframe>
32
- <div id="resizer"></div>
29
+ </head>
30
+
31
+ <body>
32
+ <div class="nav_wrap">
33
+ <iframe id="nav" src="class_list.html?1"></iframe>
34
+ <div id="resizer"></div>
35
+ </div>
36
+
37
+ <div id="main" tabindex="-1">
38
+ <div id="header">
39
+ <div id="menu">
40
+
41
+ <a href="_index.html">Index</a> &raquo;
42
+
43
+
44
+ <span class="title">Top Level Namespace</span>
45
+
46
+ </div>
47
+
48
+ <div id="search">
49
+
50
+ <a class="full_list_link" id="class_list_link" href="class_list.html">
51
+
52
+ <svg width="24" height="24">
53
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
55
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
56
+ </svg>
57
+ </a>
58
+
59
+ </div>
60
+ <div class="clear"></div>
33
61
  </div>
34
62
 
35
- <div id="main" tabindex="-1">
36
- <div id="header">
37
- <div id="menu">
38
-
39
- <a href="_index.html">Index</a> &raquo;
40
-
41
-
42
- <span class="title">Top Level Namespace</span>
43
-
44
- </div>
45
-
46
- <div id="search">
47
-
48
- <a class="full_list_link" id="class_list_link"
49
- href="class_list.html">
50
-
51
- <svg width="24" height="24">
52
- <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
- <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
- <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
- </svg>
56
- </a>
57
-
58
- </div>
59
- <div class="clear"></div>
63
+ <div id="content">
64
+ <h1>Top Level Namespace
65
+
66
+
67
+
68
+ </h1>
69
+ <div class="box_info">
70
+
71
+
72
+
73
+
74
+
75
+
76
+
77
+
78
+
79
+
80
+
60
81
  </div>
61
82
 
62
- <div id="content"><h1>Top Level Namespace
63
-
64
-
65
-
66
- </h1>
67
- <div class="box_info">
68
-
83
+ <h2>Defined Under Namespace</h2>
84
+ <p class="children">
69
85
 
70
-
71
-
72
-
73
-
74
-
75
86
 
76
-
87
+ <strong class="modules">Modules:</strong> <span class='object_link'><a href="CSVDecision2.html"
88
+ title="CSVDecision (module)">CSVDecision</a></span>
77
89
 
78
-
79
- </div>
80
90
 
81
- <h2>Defined Under Namespace</h2>
82
- <p class="children">
83
-
84
-
85
- <strong class="modules">Modules:</strong> <span class='object_link'><a href="CSVDecision.html" title="CSVDecision (module)">CSVDecision</a></span>
86
-
87
-
88
-
89
-
90
- </p>
91
91
 
92
92
 
93
+ </p>
93
94
 
94
95
 
95
96
 
@@ -97,14 +98,17 @@
97
98
 
98
99
 
99
100
 
100
- </div>
101
101
 
102
- <div id="footer">
103
- Generated on Sun Feb 11 10:26:07 2018 by
104
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
105
- 0.9.12 (ruby-2.4.0).
106
- </div>
107
102
 
108
103
  </div>
109
- </body>
110
- </html>
104
+
105
+ <div id="footer">
106
+ Generated on Sun Feb 11 10:26:07 2018 by
107
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
108
+ 0.9.12 (ruby-2.4.0).
109
+ </div>
110
+
111
+ </div>
112
+ </body>
113
+
114
+ </html>
@@ -4,11 +4,11 @@
4
4
  # Created December 2017.
5
5
  # @author Brett Vickers <brett@phillips-vickers.com>
6
6
  # See LICENSE and README.md for details.
7
- module CSVDecision
7
+ module CSVDecision2
8
8
  # Dictionary of all this table's columns - inputs, outputs etc.
9
9
  # @api private
10
10
  class Columns
11
- # @param columns [CSVDecision::Columns] Table's columns dictionary.
11
+ # @param columns [CSVDecision2::Columns] Table's columns dictionary.
12
12
  # @param row [Array] Data row.
13
13
  # @return [void]
14
14
  def self.outs_dictionary(columns:, row:)
@@ -17,14 +17,14 @@ module CSVDecision
17
17
  end
18
18
  end
19
19
 
20
- # @param columns [CSVDecision::Columns] Table's columns dictionary.
20
+ # @param columns [CSVDecision2::Columns] Table's columns dictionary.
21
21
  # @param row [Array] Data row.
22
22
  # @return [void]
23
23
  def self.ins_dictionary(columns:, row:)
24
24
  row.each { |cell| ins_cell_dictionary(columns: columns, cell: cell) }
25
25
  end
26
26
 
27
- # @param columns [CSVDecision::Columns] Table's columns dictionary.
27
+ # @param columns [CSVDecision2::Columns] Table's columns dictionary.
28
28
  # @param cell [Object] Data row cell.
29
29
  # @return [void]
30
30
  def self.ins_cell_dictionary(columns:, cell:)
@@ -86,7 +86,7 @@ module CSVDecision
86
86
 
87
87
  def self.add_ins_symbols(columns:, cell:)
88
88
  Array(cell.symbols).each do |symbol|
89
- CSVDecision::Dictionary.add_name(columns: columns, name: symbol)
89
+ CSVDecision2::Dictionary.add_name(columns: columns, name: symbol)
90
90
  end
91
91
  end
92
92
  private_class_method :add_ins_symbols
@@ -184,9 +184,9 @@ module CSVDecision
184
184
  raise TableValidationError, 'table has no header row' unless row
185
185
 
186
186
  # Build a dictionary of all valid data columns from the header row.
187
- @dictionary = CSVDecision::Dictionary.build(header: row, dictionary: Dictionary.new)
187
+ @dictionary = CSVDecision2::Dictionary.build(header: row, dictionary: Dictionary.new)
188
188
 
189
189
  freeze
190
190
  end
191
191
  end
192
- end
192
+ end
@@ -6,7 +6,7 @@ require 'csv'
6
6
  # Created December 2017.
7
7
  # @author Brett Vickers <brett@phillips-vickers.com>
8
8
  # See LICENSE and README.md for details..
9
- module CSVDecision
9
+ module CSVDecision2
10
10
  # All cells starting with this character are comments, and treated as a blank cell.
11
11
  COMMENT_CHARACTER = '#'
12
12
  private_constant :COMMENT_CHARACTER
@@ -4,13 +4,13 @@
4
4
  # Created December 2017.
5
5
  # @author Brett Vickers <brett@phillips-vickers.com>
6
6
  # See LICENSE and README.md for details.
7
- module CSVDecision
7
+ module CSVDecision2
8
8
  # Accumulate the matching row(s) and calculate the final result.
9
9
  # @api private
10
10
  class Decision
11
11
  # Main method for making decisions without a path.
12
12
  #
13
- # @param table [CSVDecision::Table] Decision table.
13
+ # @param table [CSVDecision2::Table] Decision table.
14
14
  # @param input [Hash] Input hash (keys may or may not be symbolized)
15
15
  # @param symbolize_keys [Boolean] Set to false if keys are symbolized and it's
16
16
  # OK to mutate the input hash. Otherwise a copy of the input hash is symbolized.
@@ -27,10 +27,10 @@ module CSVDecision
27
27
  # @return [Boolean] True if a first match decision table.
28
28
  attr_reader :first_match
29
29
 
30
- # @return [CSVDecision::Table] Decision table object.
30
+ # @return [CSVDecision2::Table] Decision table object.
31
31
  attr_reader :table
32
32
 
33
- # @param table [CSVDecision::Table] Decision table being processed.
33
+ # @param table [CSVDecision2::Table] Decision table being processed.
34
34
  def initialize(table:)
35
35
  # The result object is a hash of values, and each value will be an array if this is
36
36
  # a multi-row result for the +first_match: false+ option.
@@ -193,4 +193,4 @@ module CSVDecision
193
193
  result
194
194
  end
195
195
  end
196
- end
196
+ end
@@ -4,7 +4,7 @@
4
4
  # Created December 2017.
5
5
  # @author Brett Vickers.
6
6
  # See LICENSE and README.md for details.
7
- module CSVDecision
7
+ module CSVDecision2
8
8
  # Parse the default row beneath the header row if present
9
9
  # @api private
10
10
  module Defaults
@@ -44,4 +44,4 @@ module CSVDecision
44
44
  end
45
45
  private_class_method :parse_cell
46
46
  end
47
- end
47
+ end
@@ -4,7 +4,7 @@
4
4
  # Created December 2017.
5
5
  # @author Brett Vickers <brett@phillips-vickers.com>
6
6
  # See LICENSE and README.md for details.
7
- module CSVDecision
7
+ module CSVDecision2
8
8
  # Parse the CSV file's header row. These methods are only required at table load time.
9
9
  # @api private
10
10
  module Dictionary
@@ -177,4 +177,4 @@ module CSVDecision
177
177
  end
178
178
  private_class_method :input_entry
179
179
  end
180
- end
180
+ end
@@ -4,7 +4,7 @@
4
4
  # Created December 2017.
5
5
  # @author Brett Vickers <brett@phillips-vickers.com>
6
6
  # See LICENSE and README.md for details.
7
- module CSVDecision
7
+ module CSVDecision2
8
8
  # Parse the CSV file's header row. These methods are only required at table load time.
9
9
  # @api private
10
10
  module Header
@@ -53,12 +53,12 @@ module CSVDecision
53
53
  end
54
54
 
55
55
  # Parse the header row, and the defaults row if present.
56
- # @param table [CSVDecision::Table] Decision table being parsed.
56
+ # @param table [CSVDecision2::Table] Decision table being parsed.
57
57
  # @param matchers [Array<Matchers::Matcher>] Array of special cell matchers.
58
- # @return [CSVDecision::Columns] Table columns object.
58
+ # @return [CSVDecision2::Columns] Table columns object.
59
59
  def self.parse(table:, matchers:)
60
60
  # Parse the header row
61
- table.columns = CSVDecision::Columns.new(table)
61
+ table.columns = CSVDecision2::Columns.new(table)
62
62
 
63
63
  # Parse the defaults row if present
64
64
  return table.columns if table.columns.defaults.blank?
@@ -80,4 +80,4 @@ module CSVDecision
80
80
  end
81
81
  private_class_method :empty_columns?
82
82
  end
83
- end
83
+ end
@@ -4,15 +4,15 @@
4
4
  # Created December 2017.
5
5
  # @author Brett Vickers.
6
6
  # See LICENSE and README.md for details.
7
- module CSVDecision
7
+ module CSVDecision2
8
8
  # Build an index for a decision table with one or more input columns
9
9
  # designated as keys
10
10
  # @api private
11
11
  class Index
12
12
  # Build the index on the designated number of input columns.
13
13
  #
14
- # @param table [CSVDecision::Table] Decision table being indexed.
15
- # @return [CSVDecision::Index] The built index.
14
+ # @param table [CSVDecision2::Table] Decision table being indexed.
15
+ # @return [CSVDecision2::Index] The built index.
16
16
  def self.build(table:)
17
17
  # Do we even have an index?
18
18
  key_cols = index_columns(columns: table.columns.ins)
@@ -74,7 +74,7 @@ module CSVDecision
74
74
  # @return [Array<Integer>] Array of column indices
75
75
  attr_reader :columns
76
76
 
77
- # @param table [CSVDecision::Table] Decision table.
77
+ # @param table [CSVDecision2::Table] Decision table.
78
78
  # @param columns [Array<Index>] Array of column indexes to be indexed.
79
79
  def initialize(table:, columns:)
80
80
  @columns = columns
@@ -104,4 +104,4 @@ module CSVDecision
104
104
  end
105
105
  end
106
106
  end
107
- end
107
+ end
@@ -4,7 +4,7 @@
4
4
  # Created December 2017.
5
5
  # @author Brett Vickers <brett@phillips-vickers.com>
6
6
  # See LICENSE and README.md for details.
7
- module CSVDecision
7
+ module CSVDecision2
8
8
  # Parse the input hash.
9
9
  # @api private
10
10
  module Input
@@ -20,7 +20,7 @@ module CSVDecision
20
20
  parsed_input
21
21
  end
22
22
 
23
- # @param table [CSVDecision::Table] Decision table.
23
+ # @param table [CSVDecision2::Table] Decision table.
24
24
  # @param input [Hash] Input hash (keys may or may not be symbolized)
25
25
  # @return [Hash{Symbol=>Object}]
26
26
  def self.parse_data(table:, input:)
@@ -118,4 +118,4 @@ module CSVDecision
118
118
  end
119
119
  private_class_method :eval_default
120
120
  end
121
- end
121
+ end
@@ -4,12 +4,12 @@
4
4
  # Created December 2017.
5
5
  # @author Brett Vickers <brett@phillips-vickers.com>
6
6
  # See LICENSE and README.md for details.
7
- module CSVDecision
7
+ module CSVDecision2
8
8
  # Load all the CSV files located in the designated folder path.
9
9
  #
10
10
  # @param path [Pathname] Directory containing CSV decision table files.
11
- # @param options (see CSVDecision.parse)
12
- # @return [Hash{Symbol=><CSVDecision::Table>}] Hash of decision tables keyed by the CSV
11
+ # @param options (see CSVDecision2.parse)
12
+ # @return [Hash{Symbol=><CSVDecision2::Table>}] Hash of decision tables keyed by the CSV
13
13
  # file's symbolized base name.
14
14
  # @raise [ArgumentError] Invalid path name or folder.
15
15
  def self.load(path, options = {})
@@ -19,7 +19,7 @@ module CSVDecision
19
19
  # Load all CSV files located in the specified folder.
20
20
  # @api private
21
21
  module Load
22
- # (see CSVDecision.load)
22
+ # (see CSVDecision2.load)
23
23
  def self.path(path:, options:)
24
24
  raise ArgumentError, 'path argument must be a Pathname' unless path.is_a?(Pathname)
25
25
  raise ArgumentError, 'path argument not a valid folder' unless path.directory?
@@ -27,10 +27,10 @@ module CSVDecision
27
27
  tables = {}
28
28
  Dir[path.join('*.csv')].each do |file_name|
29
29
  table_name = File.basename(file_name, '.csv').to_sym
30
- tables[table_name] = CSVDecision.parse(Pathname(file_name), options)
30
+ tables[table_name] = CSVDecision2.parse(Pathname(file_name), options)
31
31
  end
32
32
 
33
33
  tables.freeze
34
34
  end
35
35
  end
36
- end
36
+ end
@@ -4,7 +4,7 @@
4
4
  # Created December 2017.
5
5
  # @author Brett Vickers <brett@phillips-vickers.com>
6
6
  # See LICENSE and README.md for details.
7
- module CSVDecision
7
+ module CSVDecision2
8
8
  # Methods to assign a matcher to data cells
9
9
  # @api private
10
10
  class Matchers
@@ -71,4 +71,4 @@ module CSVDecision
71
71
  end
72
72
  end
73
73
  end
74
- end
74
+ end
@@ -4,7 +4,7 @@
4
4
  # Created December 2017.
5
5
  # @author Brett Vickers <brett@phillips-vickers.com>
6
6
  # See LICENSE and README.md for details.
7
- module CSVDecision
7
+ module CSVDecision2
8
8
  # Methods to assign a matcher to data cells
9
9
  # @api private
10
10
  class Matchers
@@ -53,4 +53,4 @@ module CSVDecision
53
53
  # end
54
54
  end
55
55
  end
56
- end
56
+ end
@@ -4,7 +4,7 @@
4
4
  # Created December 2017.
5
5
  # @author Brett Vickers <brett@phillips-vickers.com>
6
6
  # See LICENSE and README.md for details.
7
- module CSVDecision
7
+ module CSVDecision2
8
8
  # Recognise expressions in table data cells.
9
9
  # @api private
10
10
  class Matchers
@@ -139,4 +139,4 @@ module CSVDecision
139
139
  end
140
140
  end
141
141
  end
142
- end
142
+ end
@@ -4,7 +4,7 @@
4
4
  # Created December 2017.
5
5
  # @author Brett Vickers <brett@phillips-vickers.com>
6
6
  # See LICENSE and README.md for details.
7
- module CSVDecision
7
+ module CSVDecision2
8
8
  # Methods to assign a matcher to data cells.
9
9
  # @api private
10
10
  class Matchers
@@ -41,4 +41,4 @@ module CSVDecision
41
41
  end
42
42
  end
43
43
  end
44
- end
44
+ end
@@ -4,7 +4,7 @@
4
4
  # Created December 2017.
5
5
  # @author Brett Vickers <brett@phillips-vickers.com>
6
6
  # See LICENSE and README.md for details.
7
- module CSVDecision
7
+ module CSVDecision2
8
8
  # Methods to assign a matcher to data cells
9
9
  # @api private
10
10
  class Matchers
@@ -91,4 +91,4 @@ module CSVDecision
91
91
  end
92
92
  end
93
93
  end
94
- end
94
+ end
@@ -4,7 +4,7 @@
4
4
  # Created December 2017.
5
5
  # @author Brett Vickers <brett@phillips-vickers.com>
6
6
  # See LICENSE and README.md for details.
7
- module CSVDecision
7
+ module CSVDecision2
8
8
  # Methods to assign a matcher to data cells.
9
9
  # @api private
10
10
  class Matchers
@@ -92,4 +92,4 @@ module CSVDecision
92
92
  end
93
93
  end
94
94
  end
95
- end
95
+ end
@@ -4,7 +4,7 @@
4
4
  # Created December 2017.
5
5
  # @author Brett Vickers <brett@phillips-vickers.com>
6
6
  # See LICENSE and README.md for details.
7
- module CSVDecision
7
+ module CSVDecision2
8
8
  # Recognise expressions in table data cells.
9
9
  # @api private
10
10
  class Matchers
@@ -146,4 +146,4 @@ module CSVDecision
146
146
  end
147
147
  end
148
148
  end
149
- end
149
+ end
@@ -4,7 +4,7 @@
4
4
  # Created December 2017.
5
5
  # @author Brett Vickers.
6
6
  # See LICENSE and README.md for details.
7
- module CSVDecision
7
+ module CSVDecision2
8
8
  # Match table data cells against a valid decision table expression or a simple constant.
9
9
  # @api private
10
10
  class Matchers
@@ -163,7 +163,7 @@ module CSVDecision
163
163
  # @return [Array<Matchers::Matcher>] Matchers for the output columns.
164
164
  attr_reader :outs
165
165
 
166
- # @param options (see CSVDecision.parse)
166
+ # @param options (see CSVDecision2.parse)
167
167
  def initialize(options)
168
168
  matchers = options[:matchers].collect { |klass| klass.new(options) }
169
169
  @ins = matchers.select(&:ins?)
@@ -195,8 +195,8 @@ module CSVDecision
195
195
  # Determine if the input cell string is recognised by this Matcher.
196
196
  #
197
197
  # @param cell [String] Data row cell.
198
- # @return [false, CSVDecision::Proc] Returns false if this cell is not a match; otherwise
199
- # returns the +CSVDecision::Proc+ object indicating if this is a constant or some type of
198
+ # @return [false, CSVDecision2::Proc] Returns false if this cell is not a match; otherwise
199
+ # returns the +CSVDecision2::Proc+ object indicating if this is a constant or some type of
200
200
  # function.
201
201
  def matches?(cell); end
202
202
 
@@ -217,4 +217,4 @@ module CSVDecision
217
217
  end
218
218
  end
219
219
  end
220
- end
220
+ end
@@ -4,7 +4,7 @@
4
4
  # Created December 2017.
5
5
  # @author Brett Vickers <brett@phillips-vickers.com>
6
6
  # See LICENSE and README.md for details.
7
- module CSVDecision
7
+ module CSVDecision2
8
8
  # Validate and normalize the options values supplied.
9
9
  # @api private
10
10
  module Options
@@ -20,7 +20,7 @@ module CSVDecision
20
20
  Matchers::Guard
21
21
  ].freeze
22
22
 
23
- # All valid CSVDecision::parse options with their default values.
23
+ # All valid CSVDecision2::parse options with their default values.
24
24
  VALID = {
25
25
  first_match: true,
26
26
  regexp_implicit: false,
@@ -121,4 +121,4 @@ module CSVDecision
121
121
  end
122
122
  private_class_method :validate
123
123
  end
124
- end
124
+ end