Sha256: 4d1f7da2754ead6caa32d40ed006be2236a646a7fd34c778af44b420607b5207

Contents?: true

Size: 387 Bytes

Versions: 5

Compression:

Stored size: 387 Bytes

Contents

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

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

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

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rake-funnel-0.3.2.pre lib/rake/funnel/extensions/case/pascal_case.rb
rake-funnel-0.3.1.pre lib/rake/funnel/extensions/case/pascal_case.rb
rake-funnel-0.3.0.pre lib/rake/funnel/extensions/case/pascal_case.rb
rake-funnel-0.2.0.pre lib/rake/funnel/extensions/case/pascal_case.rb
rake-funnel-0.1.0.pre lib/rake/funnel/extensions/case/pascal_case.rb