Class: Module
- Inherits:
-
Object
- Object
- Module
- Defined in:
- lib/codemodels/monkey_patching.rb
Instance Method Summary collapse
-
#simple_name ⇒ Object
It gives the simple name of a Module.
Instance Method Details
#simple_name ⇒ Object
It gives the simple name of a Module. If the name of contains a colon, it returns the part after the last colon.
6 7 8 9 |
# File 'lib/codemodels/monkey_patching.rb', line 6 def simple_name if (i = (r = name).rindex(':')) then r[0..i] = '' end r end |