Class: BasePage

Inherits:
Page show all
Defined in:
lib/etvnet_seek/core/base_page.rb

Direct Known Subclasses

ArchiveMediaPage, GroupPage, MediaPage

Constant Summary

Constants inherited from Page

Page::BASE_URL

Instance Attribute Summary

Attributes inherited from Page

#document

Attributes inherited from ServiceCall

#url

Instance Method Summary collapse

Methods inherited from Page

#initialize

Methods inherited from ServiceCall

#get, #initialize, #post

Constructor Details

This class inherits a constructor from Page

Instance Method Details

#itemsObject



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/etvnet_seek/core/base_page.rb', line 3

def items
  list = []

  document.css("#tblCategories a").each do |item|
    text = item.css("img").at(0).attributes['alt'].value
    href = item['href']

     unless href =~ /(forum|action=browse_persons|valentines2010)/
      list << MediaItem.new(text, href)
     end
  end

  list.delete_at(0)

  list
end

#page_titleObject



24
25
26
# File 'lib/etvnet_seek/core/base_page.rb', line 24

def page_title
  document.css(".global_content .global_content h1").text
end

#titleObject



20
21
22
# File 'lib/etvnet_seek/core/base_page.rb', line 20

def title
  document.css("title").text
end