| Class | Node |
| In: |
lib/methodsig.rb
lib/as_expression.rb ext/nodeinfo.c ext/nodewrap.c |
| Parent: | Object |
Node is a wrapper for Ruby‘s Nodes, which are not objects. Nodes can be obtained from many of the other methods in the nodewrap library (see Method#body and Proc#body, for example).
| OMIT_PARENS | = | { LVAR => true, GVAR => true, IVAR => true, CVAR => true, DVAR => true, LIT => true, ARRAY => true, ZARRAY => true, HASH => true, } | TODO: MATCH3 |
Return an string describing this node as a single expression. By default, this just returns the name of the node‘s type, but some node types override this method to produce more meaningful output.
Return a string as with as_expression, but surround it with parens if it is a composite expression, so that it can be used to form more complex expressions.
Return an array of strings containing the names of a node‘s members.
Swap one node with another. Both nodes must respond to the swap method. Returns the receiver.