Class: Melbourne::AST::Not

Inherits:
Node
  • Object
show all
Defined in:
lib/melbourne/ast/operators.rb

Overview

The not operator as in:

(not true)

Instance Attribute Summary collapse

Attributes inherited from Node

#line

Instance Method Summary collapse

Methods inherited from Node

#ascii_graph

Constructor Details

#initialize(line, value) ⇒ Not

Returns a new instance of Not.



45
46
47
48
# File 'lib/melbourne/ast/operators.rb', line 45

def initialize(line, value)
  @line = line
  @value = value
end

Instance Attribute Details

#valueObject

The value that is negated



43
44
45
# File 'lib/melbourne/ast/operators.rb', line 43

def value
  @value
end