Class: Rubinius::ToolSet.current::TS::AST::PushArgs
- Defined in:
- lib/rubinius/ast/values.rb
Instance Attribute Summary collapse
-
#arguments ⇒ Object
Returns the value of attribute arguments.
-
#value ⇒ Object
Returns the value of attribute value.
Attributes inherited from Node
Instance Method Summary collapse
- #bytecode(g) ⇒ Object
-
#initialize(line, arguments, value) ⇒ PushArgs
constructor
A new instance of PushArgs.
- #size ⇒ Object
- #splat? ⇒ Boolean
- #to_sexp ⇒ Object
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
#initialize(line, arguments, value) ⇒ PushArgs
Returns a new instance of PushArgs.
76 77 78 79 80 |
# File 'lib/rubinius/ast/values.rb', line 76 def initialize(line, arguments, value) @line = line @arguments = arguments @value = value end |
Instance Attribute Details
#arguments ⇒ Object
Returns the value of attribute arguments.
74 75 76 |
# File 'lib/rubinius/ast/values.rb', line 74 def arguments @arguments end |
#value ⇒ Object
Returns the value of attribute value.
74 75 76 |
# File 'lib/rubinius/ast/values.rb', line 74 def value @value end |
Instance Method Details
#bytecode(g) ⇒ Object
82 83 84 85 86 87 |
# File 'lib/rubinius/ast/values.rb', line 82 def bytecode(g) @arguments.bytecode(g) @value.bytecode(g) g.make_array 1 g.send :+, 1 end |
#size ⇒ Object
93 94 95 |
# File 'lib/rubinius/ast/values.rb', line 93 def size 1 end |
#splat? ⇒ Boolean
97 98 99 |
# File 'lib/rubinius/ast/values.rb', line 97 def splat? @arguments.splat? end |
#to_sexp ⇒ Object
89 90 91 |
# File 'lib/rubinius/ast/values.rb', line 89 def to_sexp [:argspush, @arguments.to_sexp, @value.to_sexp] end |