Sha256: 86da9ebd4e6f845ff3d25b0880d63164be1891a9ee98a77802d80f0e5b5c7f72
Contents?: true
Size: 242 Bytes
Versions: 2
Compression:
Stored size: 242 Bytes
Contents
module Hadley::Utils extend self def camelize(word, uc_first=true) parts = word.split('_') assemble = lambda { |head, tail| head + tail.capitalize } uc_first ? parts.inject('', &assemble) : parts.inject(&assemble) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
hadley-0.0.2 | lib/hadley/utils.rb |
hadley-0.0.1 | lib/hadley/utils.rb |