Class: CSVDecision::Matchers::Matcher Abstract

Inherits:
Object
  • Object
show all
Defined in:
lib/csv_decision/matchers.rb

Overview

This class is abstract.

Subclass and override #matches? to implement a custom Matcher class.

Direct Known Subclasses

Constant, Function, Numeric, Pattern, Range, Symbol

Instance Method Summary collapse

Constructor Details

#initialize(_options = nil) ⇒ Matcher

Returns a new instance of Matcher



139
# File 'lib/csv_decision/matchers.rb', line 139

def initialize(_options = nil); end

Instance Method Details

#matches?(cell) ⇒ false, CSVDecision::Proc

Determine if the input cell string is recognised by this Matcher.

Parameters:

  • cell (String)

    Data row cell.

Returns:

  • (false, CSVDecision::Proc)

    Returns false if this cell is not a match; otherwise returns the CSVDecision::Proc object indicating if this is a constant or some type of function.



146
# File 'lib/csv_decision/matchers.rb', line 146

def matches?(cell); end