Module: YARD::Parser::Ruby
Overview
Ruby
parsing components.
Instance Method Summary
-
#s(*nodes, opts = {}) ⇒ AstNode
Builds and s-expression by creating
AstNode
objects with the type provided by the first argument.
Instance Method Details
Builds and s-expression by creating Ruby::AstNode
objects with
the type provided by the first argument.
# File 'lib/yard/parser/ruby/ast_node.rb', line 25
def s(*args) type = Symbol === args.first ? args.shift : :list opts = Hash === args.last ? args.pop : {} AstNode.node_class_for(type).new(type, args, opts) end