Class: Rubinius::AST::Negate

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

Instance Attribute Summary collapse

Attributes inherited from Node

#line

Instance Method Summary collapse

Methods inherited from Node

#ascii_graph, #attributes, #children, match_arguments?, match_send?, #new_block_generator, #new_generator, #node_name, node_name, #pos, #set_child, transform, #transform, transform_comment, transform_kind, transform_kind=, transform_name, #visit, #walk

Constructor Details

#initialize(line, value) ⇒ Negate

Returns a new instance of Negate.



550
551
552
553
# File 'lib/compiler/ast/sends.rb', line 550

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

Instance Attribute Details

#valueObject

Returns the value of attribute value.



548
549
550
# File 'lib/compiler/ast/sends.rb', line 548

def value
  @value
end

Instance Method Details

#to_sexpObject



555
556
557
# File 'lib/compiler/ast/sends.rb', line 555

def to_sexp
  [:negate, @value.to_sexp]
end