Class: CodeTools::AST::ToString
- Defined in:
- lib/rubinius/code/ast/values.rb
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) ⇒ ToString
constructor
A new instance of ToString.
- #to_sexp ⇒ Object
- #value_defined(g, f) ⇒ 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, #visit, #walk
Constructor Details
#initialize(line, value) ⇒ ToString
Returns a new instance of ToString.
286 287 288 289 |
# File 'lib/rubinius/code/ast/values.rb', line 286 def initialize(line, value) @line = line @value = value end |
Instance Attribute Details
#value ⇒ Object
Returns the value of attribute value.
284 285 286 |
# File 'lib/rubinius/code/ast/values.rb', line 284 def value @value end |
Instance Method Details
#bytecode(g) ⇒ Object
291 292 293 294 295 296 |
# File 'lib/rubinius/code/ast/values.rb', line 291 def bytecode(g) pos(g) @value.bytecode(g) g.object_to_s :to_s end |
#to_sexp ⇒ Object
304 305 306 307 308 |
# File 'lib/rubinius/code/ast/values.rb', line 304 def to_sexp sexp = [:evstr] sexp << @value.to_sexp if @value sexp end |
#value_defined(g, f) ⇒ Object
298 299 300 301 302 |
# File 'lib/rubinius/code/ast/values.rb', line 298 def value_defined(g, f) if @value @value.value_defined(g, f) end end |