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 AdSense code for a given ad unit.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ AdUnitAdCode

Returns a new instance of AdUnitAdCode.



200
201
202
# File 'lib/google/apis/adsense_v2/classes.rb', line 200

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

Instance Attribute Details

#ad_codeString

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

Returns:

  • (String)


198
199
200
# File 'lib/google/apis/adsense_v2/classes.rb', line 198

def ad_code
  @ad_code
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



205
206
207
# File 'lib/google/apis/adsense_v2/classes.rb', line 205

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