Sha256: b9971ebef36e5affdca919d464634b1e82175309e3aa9f06d8900c471a3942be

Contents?: true

Size: 461 Bytes

Versions: 28

Compression:

Stored size: 461 Bytes

Contents

module Rake
  module Funnel
    module Extensions
      module Case
        module CamelCase
          def camelize
            to_s
              .split('_')
              .inject([]) { |buffer, e| buffer.push(buffer.empty? ? e : e.capitalize) }
              .join
          end
        end
      end
    end
  end
end

class String
  include Rake::Funnel::Extensions::Case::CamelCase
end

class Symbol
  include Rake::Funnel::Extensions::Case::CamelCase
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
rake-funnel-0.22.2 lib/rake/funnel/extensions/case/camel_case.rb
rake-funnel-0.22.1 lib/rake/funnel/extensions/case/camel_case.rb
rake-funnel-0.22.0 lib/rake/funnel/extensions/case/camel_case.rb
rake-funnel-0.21.2 lib/rake/funnel/extensions/case/camel_case.rb
rake-funnel-0.21.1 lib/rake/funnel/extensions/case/camel_case.rb
rake-funnel-0.21.0 lib/rake/funnel/extensions/case/camel_case.rb
rake-funnel-0.20.2 lib/rake/funnel/extensions/case/camel_case.rb
rake-funnel-0.20.1 lib/rake/funnel/extensions/case/camel_case.rb
rake-funnel-0.20.0 lib/rake/funnel/extensions/case/camel_case.rb
rake-funnel-0.19.0 lib/rake/funnel/extensions/case/camel_case.rb
rake-funnel-0.18.0 lib/rake/funnel/extensions/case/camel_case.rb
rake-funnel-0.17.0 lib/rake/funnel/extensions/case/camel_case.rb
rake-funnel-0.16.1 lib/rake/funnel/extensions/case/camel_case.rb
rake-funnel-0.16.0 lib/rake/funnel/extensions/case/camel_case.rb
rake-funnel-0.15.0.pre lib/rake/funnel/extensions/case/camel_case.rb
rake-funnel-0.14.0.pre lib/rake/funnel/extensions/case/camel_case.rb
rake-funnel-0.13.0.pre lib/rake/funnel/extensions/case/camel_case.rb
rake-funnel-0.12.0.pre lib/rake/funnel/extensions/case/camel_case.rb
rake-funnel-0.11.0.pre lib/rake/funnel/extensions/case/camel_case.rb
rake-funnel-0.10.0.pre lib/rake/funnel/extensions/case/camel_case.rb