Module: AdGear

Defined in:
lib/ad_gear/base.rb,
lib/ad_gear/file.rb,
lib/ad_gear/site.rb,
lib/ad_gear/click.rb,
lib/ad_gear/config.rb,
lib/ad_gear/format.rb,
lib/ad_gear/upload.rb,
lib/ad_gear_client.rb,
lib/ad_gear/ad_spot.rb,
lib/ad_gear/ad_unit.rb,
lib/ad_gear/template.rb,
lib/ad_gear/variable.rb,
lib/ad_gear/publisher.rb,
lib/ad_gear/advertiser.rb,
lib/ad_gear/xml_format.rb,
lib/ad_gear/interaction.rb,
lib/ad_gear/ad_unit_file.rb,
lib/ad_gear/web_campaign.rb,
lib/ad_gear/ad_unit_click.rb,
lib/ad_gear/web_placement.rb,
lib/ad_gear/has_many_array.rb,
lib/ad_gear/placement_rule.rb,
lib/ad_gear/ad_unit_variable.rb,
lib/ad_gear/ad_spot_membership.rb,
lib/ad_gear/ad_unit_interaction.rb,
lib/ad_gear/placement_membership.rb

Defined Under Namespace

Modules: XmlFormat Classes: AdSpot, AdSpotMembership, AdUnit, AdUnitClick, AdUnitFile, AdUnitInteraction, AdUnitVariable, Advertiser, Base, Click, Config, File, Format, HasManyArray, Interaction, PlacementMembership, PlacementRule, Publisher, Site, Template, UnsupportedOperation, Upload, Variable, WebCampaign, WebPlacement

Class Method Summary collapse

Class Method Details

.configObject



97
98
99
# File 'lib/ad_gear_client.rb', line 97

def self.config
  @config
end

.config=(config) ⇒ Object

Configures AdGear’s ActiveResource models.

NOTE: AdGear’s client expects and uses Nokogiri instead of REXML. See rubyglasses.blogspot.com/2009/07/40-speedup-using-nokogiri.html#instructions



76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# File 'lib/ad_gear_client.rb', line 76

def self.config=(config)
  @config = config

  AdGear::Base.logger   = config.logger

  AdGear::Base.site     = config.site
  AdGear::Base.user     = config.user
  AdGear::Base.password = config.password
  AdGear::Base.format   = config.format

  # Force use of Digest authentication
  AdGear::Base.use_basic_authentication  = false
  AdGear::Base.use_digest_authentication = true

  # TODO: Programatically determine if we can use Nokogiri
  ActiveSupport::XmlMini.backend = "Nokogiri"

  # Can't require before now, because our own method is overwritten
  require "ad_gear/core_ext"
end

.loggerObject



101
102
103
# File 'lib/ad_gear_client.rb', line 101

def self.logger
  config.logger
end