Class: InBedWith::Adsense

Inherits:
Base
  • Object
show all
Defined in:
lib/in_bed_with/adsense.rb

Constant Summary collapse

AD_TYPES =
{
  button:           { width: 125, height: 125 },
  half_banner:      { width: 234, height: 60  },
  banner:           { width: 468, height: 60  },
  vertical_banner:  { width: 120, height: 240 },
  leaderboard:      { width: 728, height: 90  },
  skyscraper:       { width: 468, height: 600 },
  wide_skyscraper:  { width: 160, height: 600 },
  small_square:     { width: 200, height: 200 },
  square:           { width: 250, height: 250 },
  small_rectangle:  { width: 180, height: 150 },
  medium_rectangle: { width: 300, height: 250 },
  large_rectangle:  { width: 336, height: 280 }
}

Instance Method Summary collapse

Methods inherited from Base

#initialize, module_attr, register

Constructor Details

This class inherits a constructor from InBedWith::Base

Instance Method Details

#codeObject



24
25
26
# File 'lib/in_bed_with/adsense.rb', line 24

def code
  "<script type=\"text/javascript\">google_ad_client = '#{client}'; google_ad_slot = '#{ad_slot}'; google_ad_width = #{properties[:width]}; google_ad_height = #{properties[:height]};</script><script type=\"text/javascript\" src=\"http://pagead2.googlesyndication.com/pagead/show_ads.js\"></script>"
end