Sha256: 1f1ea10c1c789676dcbbd3ad2ffc8e4da79589afe6e26aa182c13eb28d373026

Contents?: true

Size: 505 Bytes

Versions: 3

Compression:

Stored size: 505 Bytes

Contents

# frozen_string_literal: true

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

3 entries across 3 versions & 1 rubygems

Version Path
rake-funnel-0.24.0 lib/rake/funnel/extensions/case/pascal_case.rb
rake-funnel-0.23.0 lib/rake/funnel/extensions/case/pascal_case.rb
rake-funnel-0.22.3 lib/rake/funnel/extensions/case/pascal_case.rb