Sha256: a7faf3db7f530214692570fd1901bf28b04d61f751026e115e97b76732d37f9a
Contents?: true
Size: 442 Bytes
Versions: 125
Compression:
Stored size: 442 Bytes
Contents
module RubyApp module Mixins module ClassExtension def short_name return self.to_s.split('::').last end def class_name name = self.to_s name.gsub!(/([A-Z]+)([A-Z][a-z])/,'\1_\2') name.gsub!(/([a-z\d])([A-Z])/,'\1_\2') name.gsub!(/(::)/,'_') name.downcase! return name end end end end class Class include RubyApp::Mixins::ClassExtension end
Version data entries
125 entries across 125 versions & 1 rubygems