From: fatkodima123@... Date: 2020-08-29T17:01:18+00:00 Subject: [ruby-core:99774] [Ruby master Feature#5628] Module#basename Issue #5628 has been updated by fatkodima (Dima Fatko). Used this numerous times. I like this suggestion: regularfry (Alex Young) wrote in #note-4: > .name( false ) > .name( :full => false ) What ruby-core think on this? ---------------------------------------- Feature #5628: Module#basename https://bugs.ruby-lang.org/issues/5628#change-87287 * Author: trans (Thomas Sawyer) * Status: Feedback * Priority: Normal * Assignee: matz (Yukihiro Matsumoto) ---------------------------------------- Something I use fairly often: some_module.name.split("::").last It's useful for things like factory methods. It would be much nicer if we had: class Module def basename name.split("::").last end end -- https://bugs.ruby-lang.org/ Unsubscribe: