Sha256: e72cedeb21040ac1a39ffb22742c3c17e733f42f21a2706b0e275999bc960ce5

Contents?: true

Size: 353 Bytes

Versions: 4

Compression:

Stored size: 353 Bytes

Contents

module CloudShaped

  module Camelate

    refine Symbol do

      def camelate
        to_s.split('_').map(&:capitalize).join
      end

    end

    refine String do

      def camelate
        self
      end

    end

    refine Hash do

      def camelate_keys
        Hash[map { |key, value| [key.camelate, value] }]
      end

    end

  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
cloud_shaped-0.1.1 lib/cloud_shaped/camelate.rb
cloud_shaped-0.1.0 lib/cloud_shaped/camelate.rb
cloud_shaped-0.0.2 lib/cloud_shaped/camelate.rb
cloud_shaped-0.0.1 lib/cloud_shaped/camelate.rb