lib/groupdocs/api/entity.rb in groupdocs-0.2.11 vs lib/groupdocs/api/entity.rb in groupdocs-0.3.0

- old
+ new

@@ -107,8 +107,20 @@ word.gsub!(/(?<=[a-z])[A-Z]/) { |match| "_#{match}" } word.downcase! word.to_sym end + # + # Converts accessor symbol to instance variable symbol. + # @api private + # + def accessor_to_variable(accessor) + word = accessor.to_s + word.capitalize! + word.gsub!(/_([a-z])/) { |match| match.upcase } + word.gsub!(/_/, '') + "@#{word}".to_sym + end + end # Entity end # Api end # GroupDocs