class SiteseekerNormalizer::Parse::Category
Public Class Methods
new(category)
click to toggle source
# File lib/siteseeker_normalizer/parse/category.rb, line 4 def initialize(category) @category = category end
Public Instance Methods
current?()
click to toggle source
# File lib/siteseeker_normalizer/parse/category.rb, line 20 def current? !!@category.xpath("@class").text.match("ess-current") end
hits()
click to toggle source
# File lib/siteseeker_normalizer/parse/category.rb, line 16 def hits @category.css(".ess-num").text.strip end
query()
click to toggle source
# File lib/siteseeker_normalizer/parse/category.rb, line 12 def query URI::parse(@category.css("a").first['href']).query.strip end
title()
click to toggle source
# File lib/siteseeker_normalizer/parse/category.rb, line 8 def title @category.css("a").text.strip end