Class: CSVDecision::Matchers::Guard Private
- Defined in:
- lib/csv_decision/matchers/guard.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.
Match cell against a column symbol guard expression - e.g., >:column.present? or :column == 100.0.
Class Method Summary collapse
-
.matches?(cell) ⇒ false, CSVDecision::Proc
private
Determine if the input cell string is recognised by this Matcher.
Instance Method Summary collapse
-
#matches?(cell) ⇒ false, CSVDecision::Proc
private
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. -
#outs? ⇒ Boolean
private
Return true if this matcher applies to output cells, false otherwise.
Methods inherited from Matcher
Constructor Details
This class inherits a constructor from CSVDecision::Matchers::Matcher
Class Method Details
.matches?(cell) ⇒ false, CSVDecision::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.
123 124 125 126 127 128 |
# File 'lib/csv_decision/matchers/guard.rb', line 123 def self.matches?(cell) proc = symbol_proc(cell) return proc if proc symbol_guard(cell) end |
Instance Method Details
#matches?(cell) ⇒ false, CSVDecision::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.
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.
132 133 134 |
# File 'lib/csv_decision/matchers/guard.rb', line 132 def matches?(cell) Guard.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.
Return true if this matcher applies to output cells, false otherwise.
137 138 139 |
# File 'lib/csv_decision/matchers/guard.rb', line 137 def outs? true end |