Class: CodeTools::AST::SplatAssignment

Inherits:
Node
  • Object
show all
Defined in:
lib/rubinius/ast/variables.rb

Direct Known Subclasses

SplatArray, SplatWrapped

Instance Attribute Summary collapse

Attributes inherited from Node

#line

Instance Method Summary collapse

Methods inherited from Node

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

Constructor Details

#initialize(line, value) ⇒ SplatAssignment

Returns a new instance of SplatAssignment.



346
347
348
349
# File 'lib/rubinius/ast/variables.rb', line 346

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

Instance Attribute Details

#valueObject

Returns the value of attribute value.



344
345
346
# File 'lib/rubinius/ast/variables.rb', line 344

def value
  @value
end

Instance Method Details

#bytecode(g) ⇒ Object



351
352
353
354
355
356
# File 'lib/rubinius/ast/variables.rb', line 351

def bytecode(g)
  pos(g)

  g.cast_array
  @value.bytecode(g)
end

#to_sexpObject



358
359
360
# File 'lib/rubinius/ast/variables.rb', line 358

def to_sexp
  @value.to_sexp
end