From df3e9a3c32fed4d695f57f06857fdc0f2d2c8636 Mon Sep 17 00:00:00 2001 From: Steve Bazyl Date: Mon, 8 Aug 2016 10:47:32 -0700 Subject: [PATCH] Inflector customizations for codegen --- lib/google/apis/generator/annotator.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/google/apis/generator/annotator.rb b/lib/google/apis/generator/annotator.rb index 7105728d4..80b3716da 100644 --- a/lib/google/apis/generator/annotator.rb +++ b/lib/google/apis/generator/annotator.rb @@ -25,12 +25,20 @@ require 'addressable/uri' module Google module Apis + # @private class Generator + # Helper for picking names for methods, properties, types, etc. Performs various normaliations # as well as allows for overriding individual names from a configuration file for cases # where algorithmic approaches produce poor APIs. class Names + ActiveSupport::Inflector.inflections do |inflections| + puts "Customizing inflections..." + u = inflections.uncountable('send_as', 'as') + puts u + end + include Google::Apis::Core::Logging include NameHelpers