Class: CSVDecision::Scan Private
- Inherits:
-
Object
- Object
- CSVDecision::Scan
- Defined in:
- lib/csv_decision/scan.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Scan the input hash for all the paths specified in the decision table
Defined Under Namespace
Classes: InputHashes
Class Method Summary collapse
-
.table(table:, input:, symbolize_keys:) ⇒ Hash{Symbol=>Object}
private
Main method for making decisions with a table that has paths.
Class Method Details
.table(table:, input:, symbolize_keys:) ⇒ Hash{Symbol=>Object}
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Main method for making decisions with a table that has paths.
18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/csv_decision/scan.rb', line 18 def self.table(table:, input:, symbolize_keys:) input = symbolize_keys ? input.deep_symbolize_keys : input decision = Decision.new(table: table) input_hashes = InputHashes.new if table.[:first_match] scan_first_match(input: input, decision: decision, input_hashes: input_hashes) else scan_accumulate(input: input, decision: decision, input_hashes: input_hashes) end end |