abstractart/sbrf_merchant

View on GitHub
lib/sbrf_merchant/utils/string/to_camel_case.rb

Summary

Maintainability
A
0 mins
Test Coverage
# frozen_string_literal: true

module SbrfMerchant
  module Utils
    module String
      class ToCamelCase
        def call(str)
          str.split('_').inject('') do |buffer, e|
            buffer + (buffer.empty? ? e : e.capitalize)
          end
        end
      end
    end
  end
end