Module: Rucoa::NodeConcerns::QualifiedName

Included in:
Rucoa::Nodes::CasgnNode, Rucoa::Nodes::ClassNode, Rucoa::Nodes::ModuleNode
Defined in:
lib/rucoa/node_concerns/qualified_name.rb

Instance Method Summary collapse

Instance Method Details

#nameString

Returns:

  • (String)

Raises:

  • (NotImplementedError)


7
8
9
# File 'lib/rucoa/node_concerns/qualified_name.rb', line 7

def name
  raise NotImplementedError
end

#qualified_nameString

Returns:

  • (String)


12
13
14
15
16
17
# File 'lib/rucoa/node_concerns/qualified_name.rb', line 12

def qualified_name
  [
    name,
    *each_ancestor(:class, :constant, :module).map(&:name)
  ].reverse.join('::')
end