Module: TreeStand

Extended by:
T::Sig
Defined in:
lib/tree_stand.rb,
lib/tree_stand/node.rb,
lib/tree_stand/tree.rb,
lib/tree_stand/range.rb,
lib/tree_stand/config.rb,
lib/tree_stand/parser.rb,
lib/tree_stand/version.rb,
lib/tree_stand/visitor.rb,
lib/tree_stand/ast_modifier.rb,
lib/tree_stand/utils/printer.rb,
lib/tree_stand/visitors/tree_walker.rb,
lib/tree_stand/breadth_first_visitor.rb

Overview

typed: true

Defined Under Namespace

Modules: Utils, Visitors Classes: AstModifier, BreadthFirstVisitor, Config, Error, InvalidDocument, Node, NodeNotFound, Parser, Range, Tree, Visitor

Constant Summary collapse

VERSION =

The current version of the gem.

"0.2.0"

Class Method Summary collapse

Class Method Details

.configTreeStand::Config

Returns:



42
43
44
# File 'lib/tree_stand.rb', line 42

def config
  @config ||= Config.new
end

.configure(&block) ⇒ void

This method returns an undefined value.

Easy configuration of the gem.

Examples:

TreeStand.configure do
  config.parser_path = "path/to/parser/folder/"
end

sql_parser = TreeStand::Parser.new("sql")
ruby_parser = TreeStand::Parser.new("ruby")

Parameters:

  • block (T.proc.void)


37
38
39
# File 'lib/tree_stand.rb', line 37

def configure(&block)
  instance_eval(&block)
end