Class: WAB::Impl::Not
Overview
Negates and expression.
Instance Method Summary collapse
- #eval(data) ⇒ Object
-
#initialize(arg) ⇒ Not
constructor
Create an NOT expression with the provided argument which must be an instance of a subclass of the Expr class.
- #native ⇒ Object
Constructor Details
#initialize(arg) ⇒ Not
Create an NOT expression with the provided argument which must be an instance of a subclass of the Expr class.
- arg
-
argument to the NOT expression
12 13 14 15 |
# File 'lib/wab/impl/exprs/not.rb', line 12 def initialize(arg) super() @arg = arg end |
Instance Method Details
#eval(data) ⇒ Object
17 18 19 |
# File 'lib/wab/impl/exprs/not.rb', line 17 def eval(data) !@arg.eval(data) end |
#native ⇒ Object
21 22 23 |
# File 'lib/wab/impl/exprs/not.rb', line 21 def native() ['NOT', @arg.native] end |