Class: AnnouncesPage
- Defined in:
- lib/etvnet_seek/core/announces_page.rb
Constant Summary collapse
- ANNOUNCES_URL =
BASE_URL + "/announces.html"
Constants inherited from Page
Instance Attribute Summary
Attributes inherited from Page
Attributes inherited from ServiceCall
Instance Method Summary collapse
- #category_breadcrumbs ⇒ Object
-
#initialize ⇒ AnnouncesPage
constructor
A new instance of AnnouncesPage.
- #items ⇒ Object
Methods inherited from BasePage
Methods inherited from ServiceCall
Constructor Details
#initialize ⇒ AnnouncesPage
Returns a new instance of AnnouncesPage.
4 5 6 |
# File 'lib/etvnet_seek/core/announces_page.rb', line 4 def initialize() super(ANNOUNCES_URL) end |
Instance Method Details
#category_breadcrumbs ⇒ Object
8 9 10 |
# File 'lib/etvnet_seek/core/announces_page.rb', line 8 def [] end |
#items ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/etvnet_seek/core/announces_page.rb', line 12 def items list = [] document.css("table tr td div").each do |item| unless item.css("a").at(0).nil? image = item.css("img").at(0).attributes['src'].value.strip unless image == 'images/banner_announces.jpg' text = item.css("img").at(0).attributes['alt'].value.strip href = item.css("a").at(0).attributes['href'].value image = item.css("img").at(0).attributes['src'].value.strip record = BrowseMediaItem.new(text, href) record.image = image list << record end end end list end |