Class: Arrest::ClassUtils

Inherits:
Object
  • Object
show all
Defined in:
lib/arrest/utils/class_utils.rb

Class Method Summary collapse

Class Method Details

.simple_name(clazz) ⇒ Object

Returns the simple class name without any preceding modules or namespaces (removes everything up to the last ‘::’ inclusively from class.name)



6
7
8
# File 'lib/arrest/utils/class_utils.rb', line 6

def simple_name(clazz)
  clazz.name.gsub(/.*::/,"")
end