Class: CodeTools::AST::ToArray
Instance Attribute Summary collapse
-
#value ⇒ Object
Returns the value of attribute value.
Attributes inherited from Node
Instance Method Summary collapse
- #bytecode(g) ⇒ Object
-
#initialize(line, value) ⇒ ToArray
constructor
A new instance of ToArray.
- #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, value) ⇒ ToArray
Returns a new instance of ToArray.
249 250 251 252 |
# File 'lib/rubinius/ast/values.rb', line 249 def initialize(line, value) @line = line @value = value end |
Instance Attribute Details
#value ⇒ Object
Returns the value of attribute value.
247 248 249 |
# File 'lib/rubinius/ast/values.rb', line 247 def value @value end |
Instance Method Details
#bytecode(g) ⇒ Object
254 255 256 257 258 259 |
# File 'lib/rubinius/ast/values.rb', line 254 def bytecode(g) pos(g) @value.bytecode(g) g.cast_multi_value end |
#to_sexp ⇒ Object
261 262 263 |
# File 'lib/rubinius/ast/values.rb', line 261 def to_sexp [:to_ary, @value.to_sexp] end |