Sha256: 95d15c483a1327735ec6c3011b1964da0f5904e35875c4a281036ba5c312ea98
Contents?: true
Size: 564 Bytes
Versions: 19
Compression:
Stored size: 564 Bytes
Contents
# frozen_string_literal: true module Zeitwerk class Inflector # :nodoc: # Very basic snake case -> camel case conversion. # # Zeitwerk::Inflector.camelize("post", ...) # => "Post" # Zeitwerk::Inflector.camelize("users_controller", ...) # => "UsersController" # Zeitwerk::Inflector.camelize("api", ...) # => "Api" # # @param basename [String] # @param _abspath [String] # @return [String] def camelize(basename, _abspath) basename.split('_').map!(&:capitalize!).join end end end
Version data entries
19 entries across 19 versions & 1 rubygems