Sha256: fdee613be280e227d87afcda6f0d06ddc8b486a6cc4916d26492f7b948776504
Contents?: true
Size: 407 Bytes
Versions: 13
Compression:
Stored size: 407 Bytes
Contents
# Copyright (c) 2023 M.J.N. Corino, The Netherlands # # This software is released under the MIT license. ### # wxRuby3 sampler application core extensions ### class ::String def modulize! self.gsub!(/[^a-zA-Z0-9_]/, '_') self.sub!(/^[a-z\d]*/) { $&.capitalize } self.gsub!(/(?:_|(\/))([a-z\d]*)/i) { "#{$1}#{$2.capitalize}" } self end def modulize self.dup.modulize! end end
Version data entries
13 entries across 13 versions & 1 rubygems