Class: Bool::Not

Inherits:
Node
  • Object
show all
Defined in:
lib/bool/ast.rb,
ext/bool_ext/ext.c

Instance Attribute Summary collapse

Attributes inherited from Node

#token

Instance Method Summary collapse

Constructor Details

#initialize(token, operand) ⇒ Not

Returns a new instance of Not.



56
57
58
59
# File 'lib/bool/ast.rb', line 56

def initialize(token, operand)
  super(token)
  @operand = operand
end

Instance Attribute Details

#operandObject (readonly)

Returns the value of attribute operand.



54
55
56
# File 'lib/bool/ast.rb', line 54

def operand
  @operand
end

Instance Method Details

#accept(visitor, arg) ⇒ Object



61
62
63
# File 'lib/bool/ast.rb', line 61

def accept(visitor, arg)
  visitor.visit_not(self, arg)
end