lib/adwords4r/v13/AdServiceWrapper.rb in adwords4r-16.0.0 vs lib/adwords4r/v13/AdServiceWrapper.rb in adwords4r-17.0.0
- old
+ new
@@ -1,6 +1,6 @@
-# This file was automatically generated during the "rake generate" step of the
+# This file was automatically generated during the "rake generate" step of
# library setup.
require 'adwords4r/v13/AdServiceDriver.rb'
module AdWords
module V13
@@ -8,13 +8,22 @@
# Wrapper class for the v13 Ad service.
# This class is automatically generated.
class AdServiceWrapper
- # Holds the AdWords::API object to which the wrapper belongs
+ # Holds the AdWords::API object to which the wrapper belongs.
attr_reader :api
+ # Holds a shortcut to the parent module.
+ # Use this to avoid typing the full class name when creating classes
+ # belonging to this service, e.g.
+ # service_object.module::ClassName
+ # instead of
+ # AdWords::V13::AdService::ClassName
+ # This will make it easier to migrate your code between API versions.
+ attr_reader :module
+
public
# Constructor for AdServiceWrapper.
#
# Args:
@@ -23,9 +32,10 @@
# - api: the AdWords::API object to which the wrapper belongs
#
def initialize(driver, api)
@driver = driver
@api = api
+ @module = AdWords::V13::AdService
end
# Calls the {addAds}[http://code.google.com/apis/adwords/docs/developer/AdService.html#addAds] method of the Ad service.
# Check {the online documentation for this method}[http://code.google.com/apis/adwords/docs/developer/AdService.html#addAds].
#