Module: RuboCop::AST::Sexp
- Included in:
- Node
- Defined in:
- lib/rubocop/ast/sexp.rb
Overview
This module provides a shorthand method to create a Node like
Parser::AST::Sexp.
Instance Method Summary collapse
-
#s(type, *children) ⇒ Object
Creates a Node with type
typeand childrenchildren.
Instance Method Details
#s(type, *children) ⇒ Object
Creates a Node with type type and children children.
11 12 13 14 |
# File 'lib/rubocop/ast/sexp.rb', line 11 def s(type, *children) klass = Builder::NODE_MAP[type] || Node klass.new(type, children) end |