Transforms string letter case to camel, snake, dash and underscore without activesupport dependencies.
Forked from Rails API CaseTransform gem
We want a simple string method without polluting String class and lightweight.
If you want to use this into Rails application or any Ruby application with activesupport dependencies, you might want to consider the original one instead.
gem install case_transform2
if you use 0.x version and want to upgrade to newest version you must rename all CaseTransform to be CaseTransform2
require 'case_transform2' value = "hello_world" .(value) # => helloWorld value = "hello_world" .(value) # => HelloWorld value = "hello_world" .(value) # => hello-world value = "helloWorld" .(value) # => hello_world
value can be any of Array, Hash, Symbol, or String.
Any other object type will just be returned.
There is no
CaseTransform2.unaltered method like the original gem has
License: See LICENSE.txt file