Class: Fluent::FilterWhere::Parser::StringOpExp
- Inherits:
-
BinaryOpExp
- Object
- Exp
- BinaryOpExp
- Fluent::FilterWhere::Parser::StringOpExp
- Defined in:
- lib/fluent/plugin/filter_where/parser/exp.rb
Instance Attribute Summary
Attributes inherited from BinaryOpExp
Instance Method Summary collapse
Methods inherited from BinaryOpExp
Constructor Details
This class inherits a constructor from Fluent::FilterWhere::Parser::BinaryOpExp
Instance Method Details
#eval(record) ⇒ Object
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 |
# File 'lib/fluent/plugin/filter_where/parser/exp.rb', line 69 def eval(record) l = left.get(record) r = right.get(record) case operator when :EQ l == r when :NEQ l != r # when :GT # l > r # when :GE # l >= r # when :LT # l < r # when :LE # l <= r when :START_WITH l.start_with?(r) when :END_WITH l.end_with?(r) when :INCLUDE l.include?(r) else assert(false) false end end |