lib/weneedfeed/item.rb in weneedfeed-0.11.0 vs lib/weneedfeed/item.rb in weneedfeed-0.12.0

- old
+ new

@@ -1,9 +1,9 @@ # frozen_string_literal: true +require 'addressable' require 'marcel' -require 'uri' module Weneedfeed class Item class << self # @param [String] string @@ -72,27 +72,23 @@ end def image_url return unless image_path_or_url - ::URI.join( + ::Addressable::URI.join( @url, image_path_or_url ).to_s - rescue ::URI::InvalidURIError - "#{@url}#{image_path_or_url}" end # @return [String] def link return unless link_path_or_url - ::URI.join( + ::Addressable::URI.join( @url, link_path_or_url ).to_s - rescue ::URI::InvalidURIError - "#{@url}#{link_path_or_url}" end # @return [Nokogiri::Node, nil] def link_node @node.at(@link_selector)