Class: Module
- Inherits:
-
Object
- Object
- Module
- Defined in:
- lib/yard/core_ext/module.rb
Instance Method Summary collapse
-
#class_name ⇒ String
Returns the class name of a full module namespace path.
-
#namespace_name ⇒ String
Returns the module namespace path minus the class/module name.
Instance Method Details
#class_name ⇒ String
Returns the class name of a full module namespace path
8 9 10 |
# File 'lib/yard/core_ext/module.rb', line 8 def class_name name.split("::").last end |
#namespace_name ⇒ String
Returns the module namespace path minus the class/module name
17 18 19 |
# File 'lib/yard/core_ext/module.rb', line 17 def namespace_name name.split("::")[0..-2].join("::") end |