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.
313
314
315
316
317
|
# File 'lib/rubinius/code/ast/sends.rb', line 313
def initialize(line, node)
@line = line
@arguments = node.arguments
@value = node.value
end
|
Instance Attribute Details
#arguments ⇒ Object
Returns the value of attribute arguments.
311
312
313
|
# File 'lib/rubinius/code/ast/sends.rb', line 311
def arguments
@arguments
end
|
Instance Method Details
#bytecode(g) ⇒ Object
327
328
329
330
|
# File 'lib/rubinius/code/ast/sends.rb', line 327
def bytecode(g)
@arguments.bytecode(g)
@value.bytecode(g)
end
|
#size ⇒ Object
319
320
321
|
# File 'lib/rubinius/code/ast/sends.rb', line 319
def size
splat? ? 1 : @arguments.size + 1
end
|
#splat? ⇒ Boolean
323
324
325
|
# File 'lib/rubinius/code/ast/sends.rb', line 323
def splat?
@arguments.splat?
end
|
#to_sexp ⇒ Object
332
333
334
|
# File 'lib/rubinius/code/ast/sends.rb', line 332
def to_sexp
[:argspush, @arguments.to_sexp, @value.to_sexp]
end
|