Sha256: c905fe691c9d8759f56ad79493b899cf6097d16cf14a7fe19dc25ac12204256a
Contents?: true
Size: 346 Bytes
Versions: 3
Compression:
Stored size: 346 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..-1].map(&:capitalize) rest.unshift(parts[0]).join.to_sym end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
creditsafe_connect-0.1.2 | lib/creditsafe/camelizer_lower.rb |
creditsafe_connect-0.1.1 | lib/creditsafe/camelizer_lower.rb |
creditsafe_connect-0.1.0 | lib/creditsafe/camelizer_lower.rb |