Sha256: 4c708132368917d40894891127e7d474011aa59accaef8699265fdb8af1c7c14

Contents?: true

Size: 457 Bytes

Versions: 11

Compression:

Stored size: 457 Bytes

Contents

# <%= app_name.camelize %>
module <%= app_name.camelize %>
  # Core Extensions
  module CoreExt
    String.class_eval do
      # Camelize
      #
      # @return [String] the camelized string
      def camelize
        split(/\s|-|_/).each(&:capitalize!).join('')
      end

      # Camelize!
      #
      # @return [String] the camelized string
      def camelize!
        replace(split(/\s|-|_/).each(&:capitalize!).join(''))
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
rgentpl-2.0.0 src/lib/%app_name%/core_ext/string.rb.tt
rgentpl-1.2.6 src/lib/%app_name%/core_ext/string.rb.tt
rgentpl-1.2.5 src/lib/%app_name%/core_ext/string.rb.tt
rgentpl-1.2.4.3 src/lib/%app_name%/core_ext/string.rb.tt
rgentpl-1.2.4.2 src/lib/%app_name%/core_ext/string.rb.tt
rgentpl-1.2.4.1 src/lib/%app_name%/core_ext/string.rb.tt
rgentpl-1.2.4 src/lib/%app_name%/core_ext/string.rb.tt
rgentpl-1.2.3 src/lib/%app_name%/core_ext/string.rb.tt
rgentpl-1.2.2 src/lib/%app_name%/core_ext/string.rb.tt
rgentpl-1.2.1 src/lib/%app_name%/core_ext/string.rb.tt
rgentpl-1.2.0 src/lib/%app_name%/core_ext/string.rb.tt