Module: SyntaxTree::FullNameExt

Included in:
ClassDeclaration, ModuleDeclaration
Defined in:
lib/syntax_tree_ext.rb

Instance Method Summary collapse

Instance Method Details

#full_nameObject



16
17
18
19
20
21
22
# File 'lib/syntax_tree_ext.rb', line 16

def full_name
  if parent_node&.parent_node&.parent_node&.respond_to?(:full_name)
    "#{parent_node.parent_node.parent_node.full_name}::#{constant.to_source}"
  else
    constant.to_source
  end
end