Module: CSVDecision::Input Private
- Defined in:
- lib/csv_decision/input.rb
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Parse the input hash.
Class Method Summary collapse
-
.parse(table:, input:, symbolize_keys:) ⇒ Hash{Symbol => Hash{Symbol=>Object}, Hash{Integer=>Object}}
private
Returns a hash of two hashes: * hash: either a copy with keys symbolized or the original input object * scan_cols: Picks out the value in the input hash for each table input column.
Class Method Details
.parse(table:, input:, symbolize_keys:) ⇒ Hash{Symbol => Hash{Symbol=>Object}, Hash{Integer=>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.
Returns a hash of two hashes:
-
hash: either a copy with keys symbolized or the original input object
-
scan_cols: Picks out the value in the input hash for each table input column. Defaults to nil if the key is missing in the input hash.
17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/csv_decision/input.rb', line 17 def self.parse(table:, input:, symbolize_keys:) validate(input) parsed_input = parse_input(table: table, input: input(table, input, symbolize_keys)) # We can freeze it as we made our own copy parsed_input[:hash].freeze if symbolize_keys parsed_input.freeze end |