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

Version Path
wxruby3-1.3.1 samples/sampler/ext.rb
wxruby3-1.3.0 samples/sampler/ext.rb
wxruby3-1.2.1 samples/sampler/ext.rb
wxruby3-1.2.0 samples/sampler/ext.rb
wxruby3-1.1.2 samples/sampler/ext.rb
wxruby3-1.1.1 samples/sampler/ext.rb
wxruby3-1.1.0 samples/sampler/ext.rb
wxruby3-1.0.1 samples/sampler/ext.rb
wxruby3-0.9.8 samples/sampler/ext.rb
wxruby3-0.9.7 samples/sampler/ext.rb
wxruby3-0.9.5 samples/sampler/ext.rb
wxruby3-0.9.4 samples/sampler/ext.rb
wxruby3-0.9.3 samples/sampler/ext.rb