lib/groupdocs/api/entity.rb in groupdocs-0.2.2 vs lib/groupdocs/api/entity.rb in groupdocs-0.2.3

- old
+ new

@@ -102,10 +102,11 @@ # Converts instance variable symbol to accessor method symbol. # @api private # def variable_to_accessor(variable) word = variable.to_s.delete(?@) - word.gsub!(/[A-Z]/) { |letter| "_#{letter.downcase}" } + word.gsub!(/(?<=[a-z])[A-Z]/) { |match| "_#{match}" } + word.downcase! word.to_sym end end # Entity end # Api