Sha256: ea960307d0f35144b437739484d6f496932ce189a605531fd8d9b2422d240ff6

Contents?: true

Size: 134 Bytes

Versions: 23

Compression:

Stored size: 134 Bytes

Contents

class String
  def camel_case
    return self if self !~ /_/ && self =~ /[A-Z]+.*/
    split('_').map{|e| e.capitalize}.join
  end
end

Version data entries

23 entries across 23 versions & 3 rubygems

Version Path
benschwarz-smoke-0.5.0 lib/core_ext/string.rb
benschwarz-smoke-0.5.1 lib/core_ext/string.rb
benschwarz-smoke-0.5.10 lib/core_ext/string.rb
benschwarz-smoke-0.5.13 lib/core_ext/string.rb
benschwarz-smoke-0.5.2 lib/core_ext/string.rb
benschwarz-smoke-0.5.3 lib/core_ext/string.rb
benschwarz-smoke-0.5.4 lib/core_ext/string.rb
benschwarz-smoke-0.5.5 lib/core_ext/string.rb
benschwarz-smoke-0.5.6 lib/core_ext/string.rb
benschwarz-smoke-0.5.7 lib/core_ext/string.rb
benschwarz-smoke-0.5.8 lib/core_ext/string.rb
enginizer-0.0.1 lib/core_ext/string.rb
smoke-0.5.20 lib/core_ext/string.rb
smoke-0.5.19 lib/core_ext/string.rb
smoke-0.5.17 lib/core_ext/string.rb
smoke-0.5.16 lib/core_ext/string.rb
smoke-0.5.15 lib/core_ext/string.rb
smoke-0.5.14 lib/core_ext/string.rb
smoke-0.5.13 lib/core_ext/string.rb
smoke-0.5.12 lib/core_ext/string.rb