Module: CSVDecision::Symbol
- Defined in:
- lib/csv_decision/symbol.rb
Overview
Recognise column symbol comparison expressions in input column data cells - e.g., > :column or != :column.
Class Method Summary collapse
Class Method Details
.matches?(cell) ⇒ Boolean, ...
64 65 66 67 68 69 70 71 72 |
# File 'lib/csv_decision/symbol.rb', line 64 def self.matches?(cell) match = SYMBOL_COMPARE_RE.match(cell) return false unless match comparator = match['comparator'] || '=' name = match['name'].to_sym comparison(comparator: comparator, name: name) end |