Class: Rubinius::AST::ElementAssignment

Inherits:
SendWithArguments show all
Defined in:
lib/compiler/ast/sends.rb

Instance Attribute Summary

Attributes inherited from SendWithArguments

#arguments

Attributes inherited from Send

#block, #check_for_local, #name, #privately, #receiver, #variable

Attributes inherited from Node

#line

Instance Method Summary collapse

Methods inherited from SendWithArguments

#arguments_sexp

Methods inherited from Send

#arguments_sexp, #check_local_reference, #receiver_sexp, #to_sexp

Methods inherited from Node

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

Constructor Details

#initialize(line, receiver, arguments) ⇒ ElementAssignment

Returns a new instance of ElementAssignment.



88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# File 'lib/compiler/ast/sends.rb', line 88

def initialize(line, receiver, arguments)
  @line = line

  @receiver = receiver
  @privately = receiver.kind_of?(Self) ? true : false

  @name = :[]=

  case arguments
  when PushArgs
    @arguments = PushActualArguments.new arguments
  else
    @arguments = ActualArguments.new line, arguments
  end
end

Instance Method Details

#sexp_nameObject



104
105
106
# File 'lib/compiler/ast/sends.rb', line 104

def sexp_name
  :attrasgn
end