Returns the class name of a full module namespace path
@example
module A::B::C; class_name end # => "C"
@return [String] the last part of a module path
# File lib/yard/core_ext/module.rb, line 7 def class_name name.split("::").last end
Returns the module namespace path minus the class/module name
@example
module A::B::C; namespace_name end # => "A::B"
@return [String] the namespace minus the class/module name
# File lib/yard/core_ext/module.rb, line 16 def namespace_name name.split("::")[0..-2].join("::") end
Generated with the Darkfish Rdoc Generator 2.