lib/weneedfeed/item.rb in weneedfeed-0.4.0 vs lib/weneedfeed/item.rb in weneedfeed-0.4.1
- old
+ new
@@ -37,11 +37,11 @@
@url = url
end
# @return [String, nil]
def description
- @node.at(@description_selector).inner_html
+ @node.at(@description_selector)&.inner_html
end
# @return [String]
def link
::URI.join(
@@ -53,10 +53,10 @@
# @return [Time, nil]
def time
self.class.parse_time(time_string)
end
- # @return [String, nil]
+ # @return [String]
def title
@node.at(@title_selector).inner_text
end
private