Module: ODDB::View::GoogleAdSenseMethods

Included in:
GoogleAdSenseComposite, SponsorDisplay
Defined in:
src/view/google_ad_sense.rb

Instance Method Summary (collapse)

Instance Method Details

- (Boolean) active_sponsor?

Returns:

  • (Boolean)


18
19
20
21
# File 'src/view/google_ad_sense.rb', line 18

def active_sponsor?
  ((spons = @session.) && spons.valid?)
  #          # && @lookandfeel.enabled?(:sponsorlogo))
end

- (Object) ad_sense(model, session)



7
8
9
10
11
12
13
14
15
16
17
# File 'src/view/google_ad_sense.rb', line 7

def ad_sense(model, session)
  if(@lookandfeel.enabled?(:google_adsense) \
    && !(@session.user.valid? || active_sponsor?))
    google = GoogleAdSense.new(model, session, self)
    google.channel = self::class::GOOGLE_CHANNEL
    google.format = self::class::GOOGLE_FORMAT
    google.width = self::class::GOOGLE_WIDTH
    google.height = self::class::GOOGLE_HEIGHT
    google
  end
end