class SiteseekerNormalizer::Parse::Entry

Public Class Methods

new(entry) click to toggle source
# File lib/siteseeker_normalizer/parse/entry.rb, line 4
def initialize(entry)
  @entry = entry
end

Public Instance Methods

breadcrumbs() click to toggle source
category() click to toggle source
# File lib/siteseeker_normalizer/parse/entry.rb, line 38
def category
  @entry.xpath("following-sibling::*[2]").css('.ess-category').text.strip
end
content_type() click to toggle source
# File lib/siteseeker_normalizer/parse/entry.rb, line 24
def content_type
  @entry.css('.ess-dtypelabel').text.gsub(/[\[\]]/, "").strip
end
date() click to toggle source
# File lib/siteseeker_normalizer/parse/entry.rb, line 28
def date
  @entry.xpath("following-sibling::dd[2]").css('.ess-date').text.strip
end
number() click to toggle source
# File lib/siteseeker_normalizer/parse/entry.rb, line 8
def number
  @entry.css('.ess-hitnum').text.to_i
end
summary() click to toggle source
# File lib/siteseeker_normalizer/parse/entry.rb, line 16
def summary
  @entry.xpath("following-sibling::*[1]/div[@class='ess-hit-extract']").text.strip
end
title() click to toggle source
# File lib/siteseeker_normalizer/parse/entry.rb, line 12
def title
  @entry.css('a').first.text
end
url() click to toggle source
# File lib/siteseeker_normalizer/parse/entry.rb, line 20
def url
  @entry.css('a').first['href']
end