lib/devry.rb in devry-0.0.2 vs lib/devry.rb in devry-0.0.3
- old
+ new
@@ -9,11 +9,11 @@
element.text.strip
end
def extract_time(element)
return nil if element.nil?
- Time.parse(element.text.strip)
+ Time.parse(extract_text(element))
end
def extract_url(element)
return nil if element.nil?
element.at("a")['href']
@@ -88,10 +88,10 @@
split_location[0]
end
def description
page = fetch_page(url)
- ["tr:nth-child(11) p", "tr:nth-child(13) p", "tr:nth-child(15) p"].map do |selector|
+ ["tr:nth-child(11)", "tr:nth-child(13)", "tr:nth-child(15)"].map do |selector|
extract_text page.at(selector)
end.join("\n\n")
end
private