Sha256: 3dbad6832574bfc44ec5c2130ef6fb31f7660e2656a0dfa4bf78225497a7b2ab

Contents?: true

Size: 374 Bytes

Versions: 11

Compression:

Stored size: 374 Bytes

Contents

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

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

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

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
rake-funnel-0.3.2.pre lib/rake/funnel/extensions/case/camel_case.rb
rake-funnel-0.3.1.pre lib/rake/funnel/extensions/case/camel_case.rb
rake-funnel-0.3.0.pre lib/rake/funnel/extensions/case/camel_case.rb
rake-funnel-0.2.0.pre lib/rake/funnel/extensions/case/camel_case.rb
rake-funnel-0.1.0.pre lib/rake/funnel/extensions/case/camel_case.rb
rake-funnel-0.0.6.pre lib/rake/funnel/extensions/camel_case.rb
rake-funnel-0.0.5.pre lib/rake/funnel/extensions/camel_case.rb
rake-funnel-0.0.4.pre lib/rake/funnel/extensions/camel_case.rb
rake-funnel-0.0.3.pre lib/rake/funnel/extensions/camel_case.rb
rake-funnel-0.0.2.pre lib/rake/funnel/extensions/camel_case.rb
rake-funnel-0.0.1.pre lib/rake/funnel/extensions/camel_case.rb