Module | YARD::Parser::Ruby
In: | lib/yard/parser/ruby/ruby_parser.rb lib/yard/parser/ruby/ast_node.rb lib/yard/parser/ruby/legacy/ruby_parser.rb lib/yard/autoload.rb

### Methods

s

### Classes and Modules

Module YARD::Parser::Ruby::Legacy
Class YARD::Parser::Ruby::AstNode
Class YARD::Parser::Ruby::ClassNode
Class YARD::Parser::Ruby::CommentNode
Class YARD::Parser::Ruby::ConditionalNode
Class YARD::Parser::Ruby::KeywordNode
Class YARD::Parser::Ruby::LiteralNode
Class YARD::Parser::Ruby::LoopNode
Class YARD::Parser::Ruby::MethodCallNode
Class YARD::Parser::Ruby::MethodDefinitionNode
Class YARD::Parser::Ruby::ModuleNode
Class YARD::Parser::Ruby::ParameterNode
Class YARD::Parser::Ruby::ReferenceNode
Class YARD::Parser::Ruby::RipperParser
Class YARD::Parser::Ruby::RubyParser

### Public Instance methods

s(*args)

Builds and s-expression by creating {AstNode} objects with the type provided by the first argument.

@example An implicit list of keywords

      ast = s(s(:kw, "if"), s(:kw, "else"))
      ast.type # => :list

@example A method call

      s(:command, s(:var_ref, "mymethod"))

@overload s(*nodes, opts = {})

      @param [Array<AstNode>] nodes a list of nodes.
      @param [Hash] opts any extra options (docstring, file, source) to
        set on the object
      @return [AstNode] an implicit node where node.type == +:list+

@overload s(type, *children, opts = {})

      @param [Symbol] type the node type
      @param [Array<AstNode>] children any child nodes inside this one
      @param [Hash] opts any extra options to set on the object
      @return [AstNode] a node of type +type+.

@see AstNode#initialize

[Validate]