Sha256: 82947843cebfe57844a3c418cccc6e82d3ec6d8feae313be931d91d6410386ed
Contents?: true
Size: 344 Bytes
Versions: 5
Compression:
Stored size: 344 Bytes
Contents
# frozen_string_literal: true module Creditsafe class CamelizerLower # Converts this_is_my_string to thisIsMyString and returns it as a symbol. def self.transform(underscore_string) parts = underscore_string.to_s.split('_') rest = parts[1..].map(&:capitalize) rest.unshift(parts[0]).join.to_sym end end end
Version data entries
5 entries across 5 versions & 1 rubygems