Class: CodeTools::AST::PushArgs
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.
188 189 190 191 192 |
# File 'lib/rubinius/ast/values.rb', line 188 def initialize(line, arguments, value) @line = line @arguments = arguments @value = value end |
Instance Attribute Details
#arguments ⇒ Object
Returns the value of attribute arguments.
186 187 188 |
# File 'lib/rubinius/ast/values.rb', line 186 def arguments @arguments end |
#value ⇒ Object
Returns the value of attribute value.
186 187 188 |
# File 'lib/rubinius/ast/values.rb', line 186 def value @value end |
Instance Method Details
#bytecode(g) ⇒ Object
194 195 196 197 198 199 |
# File 'lib/rubinius/ast/values.rb', line 194 def bytecode(g) @arguments.bytecode(g) @value.bytecode(g) g.make_array 1 g.send :+, 1 end |
#size ⇒ Object
205 206 207 |
# File 'lib/rubinius/ast/values.rb', line 205 def size 1 end |
#splat? ⇒ Boolean
209 210 211 |
# File 'lib/rubinius/ast/values.rb', line 209 def splat? @arguments.splat? end |
#to_sexp ⇒ Object
201 202 203 |
# File 'lib/rubinius/ast/values.rb', line 201 def to_sexp [:argspush, @arguments.to_sexp, @value.to_sexp] end |