Class: ODDB::View::GoogleAdSense

Inherits:
HtmlGrid::Component show all
Defined in:
src/view/google_ad_sense.rb

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Methods inherited from HtmlGrid::Component

#additional_javascripts, #dynamic_html

Instance Attribute Details

- (Object) channel

Returns the value of attribute channel



25
26
27
# File 'src/view/google_ad_sense.rb', line 25

def channel
  @channel
end

- (Object) format

Returns the value of attribute format



25
26
27
# File 'src/view/google_ad_sense.rb', line 25

def format
  @format
end

- (Object) height

Returns the value of attribute height



25
26
27
# File 'src/view/google_ad_sense.rb', line 25

def height
  @height
end

- (Object) width

Returns the value of attribute width



25
26
27
# File 'src/view/google_ad_sense.rb', line 25

def width
  @width
end

Instance Method Details

- (Object) init



26
27
28
29
30
31
# File 'src/view/google_ad_sense.rb', line 26

def init
  @format = "250x250_as"
  @width = "250"
  @height = "250"
  super
end

- (Object) to_html(context)



32
33
34
# File 'src/view/google_ad_sense.rb', line 32

def to_html(context)
  "<script type=\"text/javascript\"><!--\ngoogle_ad_client = \"pub-6948570700973491\";\ngoogle_ad_width = \"\#{@width}\";\ngoogle_ad_height = \"\#{@height}\";\ngoogle_ad_format = \"\#{@format}\";\ngoogle_ad_channel =\"\#{@channel}\";\ngoogle_ad_type = \"text_image\";\ngoogle_color_border = \"DBE1D6\";\ngoogle_color_bg = \"E6FFD6\";\ngoogle_color_link = \"003366\";\ngoogle_color_url = \"FF3300\";\ngoogle_color_text = \"003399\";\n//--></script>\n<script type=\"text/javascript\"\nsrc=\"http://pagead2.googlesyndication.com/pagead/show_ads.js\">\n</script>\n"
end