Class: Fluent::FilterWhere::Parser::NullOpExp
- Defined in:
- lib/fluent/plugin/filter_where/parser/exp.rb
Instance Attribute Summary collapse
-
#literal ⇒ Object
readonly
Returns the value of attribute literal.
-
#operator ⇒ Object
readonly
Returns the value of attribute operator.
Instance Method Summary collapse
- #eval(record) ⇒ Boolean
-
#initialize(literal, operator) ⇒ NullOpExp
constructor
A new instance of NullOpExp.
Constructor Details
#initialize(literal, operator) ⇒ NullOpExp
Returns a new instance of NullOpExp.
117 118 119 120 |
# File 'lib/fluent/plugin/filter_where/parser/exp.rb', line 117 def initialize(literal, operator) @literal = literal @operator = operator end |
Instance Attribute Details
#literal ⇒ Object (readonly)
Returns the value of attribute literal.
113 114 115 |
# File 'lib/fluent/plugin/filter_where/parser/exp.rb', line 113 def literal @literal end |
#operator ⇒ Object (readonly)
Returns the value of attribute operator.
113 114 115 |
# File 'lib/fluent/plugin/filter_where/parser/exp.rb', line 113 def operator @operator end |
Instance Method Details
#eval(record) ⇒ Boolean
123 124 125 126 127 128 129 130 131 132 133 134 |
# File 'lib/fluent/plugin/filter_where/parser/exp.rb', line 123 def eval(record) is_null = literal.get(record).nil? case operator when :EQ is_null when :NEQ ! is_null else assert(false) false end end |