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.



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

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)


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

def ad_code
  @ad_code
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



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

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