Class: Google::Apis::AdsenseV2::AdUnitAdCode

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/adsense_v2/classes.rb,
lib/google/apis/adsense_v2/representations.rb,
lib/google/apis/adsense_v2/representations.rb

Overview

Representation of the ad unit code for a given ad unit. For more information, see About the AdSense code and Where to place the ad code in your HTML.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ AdUnitAdCode

Returns a new instance of AdUnitAdCode.



248
249
250
# File 'lib/google/apis/adsense_v2/classes.rb', line 248

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#ad_codeString

Output only. The code snippet to add to the body of an HTML page. Corresponds to the JSON property adCode

Returns:

  • (String)


246
247
248
# File 'lib/google/apis/adsense_v2/classes.rb', line 246

def ad_code
  @ad_code
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



253
254
255
# File 'lib/google/apis/adsense_v2/classes.rb', line 253

def update!(**args)
  @ad_code = args[:ad_code] if args.key?(:ad_code)
end