Sha256: f7b3c498626b49f1cfa5660d06904558310f44ec2de93dd83cc776939db69d61
Contents?: true
Size: 1.08 KB
Versions: 3
Compression:
Stored size: 1.08 KB
Contents
require 'yaml' module AdWords class Service SERVICE_YAML = <<PAT 2: [Creative, Keyword, Criterion, AdGroup, Campaign, TrafficEstimator, Report, Info, Account] 3: [Creative, Keyword, Criterion, AdGroup, Campaign, TrafficEstimator, Report, Info, Account, KeywordTool] PAT @@services = YAML::load(SERVICE_YAML) def Service.getVersions @@services.keys end def Service.getServices(version) @@services[version] end def Service.doRequire(version) req = [] Service.getServices(version).each {|s| req << "require 'adwords4r/v#{version}/#{s}ServiceDriver'"} req.each {|r| eval(r)} end def Service.getService(version, method) end def Service.getMethodMap(drivers) #Service.getVersions.each do |v| methodMap = Hash.new drivers.each_value {|d| d.class::Methods.each {|m| methodMap[m[1]] = d}} return methodMap end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
adwords4r-0.2 | lib/adwords4r/services.rb |
adwords4r-0.3 | lib/adwords4r/services.rb |
adwords4r-0.4 | lib/adwords4r/services.rb |