Sha256: 97212dc0e288c9fbdab89d76da665516d1a65b0e177b760dbb1f7bfdd3d3119e

Contents?: true

Size: 474 Bytes

Versions: 28

Compression:

Stored size: 474 Bytes

Contents

module Rake
  module Funnel
    module Extensions
      module Case
        module PascalCase
          def pascalize
            to_s
              .split('_')
              .inject([]) { |buffer, e| buffer.push(e.slice(0, 1).capitalize + e.slice(1..-1)) }
              .join
          end
        end
      end
    end
  end
end

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

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

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
rake-funnel-0.9.1.pre lib/rake/funnel/extensions/case/pascal_case.rb
rake-funnel-0.9.0.pre lib/rake/funnel/extensions/case/pascal_case.rb
rake-funnel-0.8.0.pre lib/rake/funnel/extensions/case/pascal_case.rb
rake-funnel-0.7.0.pre lib/rake/funnel/extensions/case/pascal_case.rb
rake-funnel-0.6.1.pre lib/rake/funnel/extensions/case/pascal_case.rb
rake-funnel-0.6.0.pre lib/rake/funnel/extensions/case/pascal_case.rb
rake-funnel-0.5.0.pre lib/rake/funnel/extensions/case/pascal_case.rb
rake-funnel-0.4.0.pre lib/rake/funnel/extensions/case/pascal_case.rb