Class: Module

Inherits:
Object
  • Object
show all
Defined in:
lib/codemodels/monkey_patching.rb

Instance Method Summary collapse

Instance Method Details

#simple_nameObject

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