Module: Camelizable

Defined in:
lib/camelizable.rb,
lib/camelizable/version.rb

Constant Summary collapse

VERSION =
"0.0.3"

Instance Method Summary collapse

Instance Method Details

#lcc(sep = /[^[:alnum:]]+/) ⇒ Object



8
9
10
# File 'lib/camelizable.rb', line 8

def lcc(sep=/[^[:alnum:]]+/)
  ucc(sep).sub(/./){ $&.downcase }
end

#ucc(sep = /[^[:alnum:]]+/) ⇒ Object



4
5
6
# File 'lib/camelizable.rb', line 4

def ucc(sep=/[^[:alnum:]]+/)
  split(sep).map(&:capitalize).join
end