Module: Rensei::Unparser::Base
- Included in:
- Ruby2_6_0
- Defined in:
- lib/rensei/unparser.rb
Instance Method Summary collapse
Instance Method Details
#unparse(node, opt = {}) ⇒ Object
42 43 44 45 46 47 48 49 50 |
# File 'lib/rensei/unparser.rb', line 42 def unparse(node, opt = {}) case node when RubyVM::AbstractSyntaxTree::Node, Hash, Array method_name = "NODE_#{node.type}" respond_to?(method_name, true) ? send(method_name, node, opt.dup) : node else node end end |