Class: Rubinius::AST::SendWithArguments

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

Instance Attribute Summary collapse

Attributes inherited from Send

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

Attributes inherited from Node

#line

Instance Method Summary collapse

Methods inherited from Send

#check_local_reference, #receiver_sexp, #sexp_name, #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, name, arguments, privately = false) ⇒ SendWithArguments

Returns a new instance of SendWithArguments.



57
58
59
60
61
# File 'lib/compiler/ast/sends.rb', line 57

def initialize(line, receiver, name, arguments, privately=false)
  super line, receiver, name, privately
  @block = nil
  @arguments = ActualArguments.new line, arguments
end

Instance Attribute Details

#argumentsObject

Returns the value of attribute arguments.



55
56
57
# File 'lib/compiler/ast/sends.rb', line 55

def arguments
  @arguments
end

Instance Method Details

#arguments_sexp(name = :arglist) ⇒ Object



63
64
65
66
67
# File 'lib/compiler/ast/sends.rb', line 63

def arguments_sexp(name=:arglist)
  sexp = [name] + @arguments.to_sexp
  sexp << @block.to_sexp if @block
  sexp
end