Class: CodeTools::AST::PushArguments
- Inherits:
-
Node
- Object
- Node
- CodeTools::AST::PushArguments
show all
- Defined in:
- lib/rubinius/code/ast/sends.rb
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
Returns a new instance of PushArguments.
311
312
313
314
315
|
# File 'lib/rubinius/code/ast/sends.rb', line 311
def initialize(line, node)
@line = line
@arguments = node.arguments
@value = node.value
end
|
Instance Attribute Details
#arguments ⇒ Object
Returns the value of attribute arguments.
309
310
311
|
# File 'lib/rubinius/code/ast/sends.rb', line 309
def arguments
@arguments
end
|
Instance Method Details
#bytecode(g) ⇒ Object
325
326
327
328
|
# File 'lib/rubinius/code/ast/sends.rb', line 325
def bytecode(g)
@arguments.bytecode(g)
@value.bytecode(g)
end
|
#size ⇒ Object
317
318
319
|
# File 'lib/rubinius/code/ast/sends.rb', line 317
def size
splat? ? 1 : @arguments.size + 1
end
|
#splat? ⇒ Boolean
321
322
323
|
# File 'lib/rubinius/code/ast/sends.rb', line 321
def splat?
@arguments.splat?
end
|
#to_sexp ⇒ Object
330
331
332
|
# File 'lib/rubinius/code/ast/sends.rb', line 330
def to_sexp
[:argspush, @arguments.to_sexp, @value.to_sexp]
end
|