class WAB::Impl::Not
Negates and expression.
Public Class Methods
new(arg)
click to toggle source
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
Calls superclass method
WAB::Impl::Expr::new
# File lib/wab/impl/exprs/not.rb, line 12 def initialize(arg) super() @arg = arg end
Public Instance Methods
eval(data)
click to toggle source
# File lib/wab/impl/exprs/not.rb, line 17 def eval(data) !@arg.eval(data) end
native()
click to toggle source
# File lib/wab/impl/exprs/not.rb, line 21 def native() ['NOT', @arg.native] end