Class: Melbourne::AST::Negate

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

Overview

A negation as in:

-1

Instance Attribute Summary collapse

Attributes inherited from Node

#line

Instance Method Summary collapse

Methods inherited from Node

#ascii_graph

Constructor Details

#initialize(line, value) ⇒ Negate



374
375
376
377
# File 'lib/melbourne/ast/sends.rb', line 374

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

Instance Attribute Details

#valueObject

The value that is negated



372
373
374
# File 'lib/melbourne/ast/sends.rb', line 372

def value
  @value
end