Sha256: 3dd56889861acc64b7f37415e21ad8b3f9b17cde20266f7cc3fc504a7e6b139e

Contents?: true

Size: 200 Bytes

Versions: 14

Compression:

Stored size: 200 Bytes

Contents

module DeepCover
  module Tools::Camelize
    # Poor man's camelize. 'an_example' => 'AnExample'
    def camelize(string)
      string.to_s.gsub(/([a-z\d]*)[_?!]?/){ $1.capitalize }
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
deep-cover-0.1.14 lib/deep_cover/tools/camelize.rb
deep-cover-0.1.13 lib/deep_cover/tools/camelize.rb
deep-cover-0.1.12 lib/deep_cover/tools/camelize.rb
deep-cover-0.1.11 lib/deep_cover/tools/camelize.rb
deep-cover-0.1.10 lib/deep_cover/tools/camelize.rb
deep-cover-0.1.9 lib/deep_cover/tools/camelize.rb
deep-cover-0.1.8 lib/deep_cover/tools/camelize.rb
deep-cover-0.1.7 lib/deep_cover/tools/camelize.rb
deep-cover-0.1.6 lib/deep_cover/tools/camelize.rb
deep-cover-0.1.5 lib/deep_cover/tools/camelize.rb
deep-cover-0.1.4 lib/deep_cover/tools/camelize.rb
deep-cover-0.1.3 lib/deep_cover/tools/camelize.rb
deep-cover-0.1.2 lib/deep_cover/tools/camelize.rb
deep-cover-0.1.1 lib/deep_cover/tools/camelize.rb