123456789_123456789_123456789_123456789_123456789_

Module: RuboCop::AST::Sexp

Overview

This module provides a shorthand method to create a Node like Parser::AST::Sexp.

Instance Method Summary

Instance Method Details

#s(type, *children)

Creates a Node with type type and children children.

[ GitHub ]

  
# File 'lib/rubocop/ast/sexp.rb', line 11

def s(type, *children)
  klass = Builder::NODE_MAP[type] || Node
  klass.new(type, children)
end