lib/codat/camelizer.rb in codat-0.1.6.2 vs lib/codat/camelizer.rb in codat-0.1.7
- old
+ new
@@ -4,10 +4,10 @@
class Camelizer
# Converts this_is_my_string to thisIsMyString and returns it as a symbol.
def self.transform(underscore_string)
parts = underscore_string.to_s.split('_')
- rest = parts[1..-1].map(&:capitalize)
+ rest = parts[1..].map(&:capitalize)
rest.unshift(parts[0]).join.to_sym
end
end
end