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
- #module_name ⇒ Object (also: #mn)
Instance Method Details
#module_name ⇒ Object Also known as: mn
22 |
# File 'lib/treat/helpers/object.rb', line 22 def module_name; self.to_s.split('::')[-1]; end |