Class: Module
Instance Method Summary collapse
-
#basename ⇒ Object
This comes in handy when you are trying to do meta-programming with modules / classes that may be nested within other modules / classes.
Instance Method Details
#basename ⇒ Object
This comes in handy when you are trying to do meta-programming with modules / classes that may be nested within other modules / classes. I think I’ve seen it defined in facets, but I’m not relying on facets just for this one method.
6 7 8 |
# File 'lib/utilities/module.rb', line 6 def basename self.name.split('::').last || '' end |