Class: CodeTools::AST::PushArguments
- Inherits:
-
Node
- Object
- Node
- CodeTools::AST::PushArguments
show all
- Defined in:
- lib/rubinius/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.
303
304
305
306
307
|
# File 'lib/rubinius/ast/sends.rb', line 303
def initialize(line, node)
@line = line
@arguments = node.arguments
@value = node.value
end
|
Instance Attribute Details
#arguments ⇒ Object
Returns the value of attribute arguments.
301
302
303
|
# File 'lib/rubinius/ast/sends.rb', line 301
def arguments
@arguments
end
|
Instance Method Details
#bytecode(g) ⇒ Object
317
318
319
320
|
# File 'lib/rubinius/ast/sends.rb', line 317
def bytecode(g)
@arguments.bytecode(g)
@value.bytecode(g)
end
|
#size ⇒ Object
309
310
311
|
# File 'lib/rubinius/ast/sends.rb', line 309
def size
splat? ? 1 : @arguments.size + 1
end
|
#splat? ⇒ Boolean
313
314
315
|
# File 'lib/rubinius/ast/sends.rb', line 313
def splat?
@arguments.splat?
end
|
#to_sexp ⇒ Object
322
323
324
|
# File 'lib/rubinius/ast/sends.rb', line 322
def to_sexp
[:argspush, @arguments.to_sexp, @value.to_sexp]
end
|