Module: Treat::Helpers::Object::ModuleName

Defined in:
lib/treat/helpers/object.rb

Overview

Retrieve the last name of a class/module (i.e. the part after the last “::”).

Instance Method Summary collapse

Instance Method Details

#module_nameObject Also known as: mn



22
# File 'lib/treat/helpers/object.rb', line 22

def module_name; self.to_s.split('::')[-1]; end