Class: Rubinius::AST::PushActualArguments

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

Instance Method Summary collapse

Constructor Details

#initialize(pa) ⇒ PushActualArguments

Returns a new instance of PushActualArguments.



128
129
130
131
# File 'lib/compiler/ast/sends.rb', line 128

def initialize(pa)
  @arguments = pa.arguments
  @value = pa.value
end

Instance Method Details

#sizeObject



133
134
135
# File 'lib/compiler/ast/sends.rb', line 133

def size
  splat? ? 1 : @arguments.size + 1
end

#splat?Boolean

Returns:

  • (Boolean)


137
138
139
# File 'lib/compiler/ast/sends.rb', line 137

def splat?
  @arguments.kind_of? SplatValue or @arguments.kind_of? ConcatArgs
end

#to_sexpObject



141
142
143
# File 'lib/compiler/ast/sends.rb', line 141

def to_sexp
  [@arguments.to_sexp, @value.to_sexp]
end