Class: CSVDecision2::Matchers::Matcher Private

Inherits:
Object
  • Object
show all
Defined in:
lib/csv_decision2/matchers.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.

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

Direct Known Subclasses

Constant, Function, Guard, Numeric, Pattern, Range, Symbol

Instance Method Summary collapse

Constructor Details

#initialize(_options = nil) ⇒ Matcher

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 new instance of Matcher.



193
# File 'lib/csv_decision2/matchers.rb', line 193

def initialize(_options = nil); end

Instance Method Details

#ins?Boolean

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.

Does this matcher apply to output cells?

Returns:

  • (Boolean)

    Return true if this matcher applies to input cells, false otherwise.



215
216
217
# File 'lib/csv_decision2/matchers.rb', line 215

def ins?
  true
end

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

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.

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

Parameters:

  • cell (String)

    Data row cell.

Returns:

  • (false, CSVDecision2::Proc)

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



201
# File 'lib/csv_decision2/matchers.rb', line 201

def matches?(cell); end

#outs?Boolean

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.

Does this matcher apply to output cells?

Returns:

  • (Boolean)

    Return true if this matcher applies to output cells, false otherwise.



207
208
209
# File 'lib/csv_decision2/matchers.rb', line 207

def outs?
  false
end