Module: SyntaxTree

Defined in:
lib/syntax_tree_ext.rb,
lib/syntax_tree_ext/source_ext.rb,
lib/syntax_tree_ext/parent_node_ext.rb

Defined Under Namespace

Modules: FullNameExt, HashNodeExt Classes: BareAssocHash, ClassDeclaration, HashLiteral, ModuleDeclaration, Node

Class Method Summary collapse

Class Method Details

.original_parse_parentObject



5
6
7
8
9
# File 'lib/syntax_tree_ext/parent_node_ext.rb', line 5

def parse(source)
  node = original_parse_source(source)
  node.set_source(source)
  node
end

.original_parse_sourceObject



5
# File 'lib/syntax_tree_ext/source_ext.rb', line 5

alias_method :original_parse_source, :parse

.parse(source) ⇒ Object



7
8
9
10
11
# File 'lib/syntax_tree_ext/source_ext.rb', line 7

def parse(source)
  node = original_parse_source(source)
  node.set_source(source)
  node
end