Skip to content

Commit

Permalink
Revert CamelCase rule back to its original goodness
Browse files Browse the repository at this point in the history
Shout out to @kafkasbug for watching this like a hawk and discovering that
the tests, in fact, did not cover all of this behavior.

Yet more fixes for #46
  • Loading branch information
tjarratt committed Sep 23, 2014
1 parent d329e39 commit e202576
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/gyoku/xml_key.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module Gyoku
module XMLKey
class << self

CAMELCASE = lambda { |key| key.split(/[|_]+/).map { |s| s[0] = s[0].upcase; s }.join }
CAMELCASE = lambda { |key| key.gsub(/\/(.?)/) { |m| "::#{m.split('').last.upcase}" }.gsub(/(?:^|_)(.)/) { |m| m.split('').last.upcase } }
LOWER_CAMELCASE = lambda { |key| key[0].chr.downcase + CAMELCASE.call(key)[1..-1] }
UPCASE = lambda { |key| key.upcase }

Expand Down

0 comments on commit e202576

Please sign in to comment.