diff options
| -rw-r--r-- | lib/axlsx.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/axlsx.rb b/lib/axlsx.rb index 92c58b33..54c0ff2c 100644 --- a/lib/axlsx.rb +++ b/lib/axlsx.rb @@ -87,8 +87,9 @@ module Axlsx # performs the increadible feat of changing snake_case to CamelCase # @param [String] s The snake case string to camelize # @return [String] - def self.camel(s="") - s = s.capitalize.gsub(/_(.)/){ $1.upcase } + def self.camel(s="", all_caps = true) + s = s.capitalize if all_caps + s.gsub(/_(.)/){ $1.upcase } end end |
