Class: AST2Dot::NodeLabel
- Inherits:
-
Object
- Object
- AST2Dot::NodeLabel
- Defined in:
- lib/ast2dot/node_label.rb
Class Method Summary collapse
Class Method Details
.label(node) ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/ast2dot/node_label.rb', line 3 def self.label(node) case node.type when :FCALL "%s\\nmethod_id: %p" % [node.type, node.children[0]] when :OPCALL "%s\\nmethod_id: %p" % [node.type, node.children[1]] when :LIT "%s\\nvalue: %p" % [node.type, node.children[0]] else node.type end end |