123456789_123456789_123456789_123456789_123456789_

Class: Module

Relationships & Source Files
Inherits: Object
Defined in: lib/yard/core_ext/module.rb

Instance Method Summary

Instance Method Details

#class_nameString

Returns the class name of a full module namespace path

Examples:

module A::B::C; class_name end # => "C"

Returns:

  • (String)

    the last part of a module path

[ GitHub ]

  
# File 'lib/yard/core_ext/module.rb', line 8

def class_name
  name.split("::").last
end