Method: Html2rss::AutoSource::Scraper::Schema::Thing#url

Defined in:
lib/html2rss/auto_source/scraper/schema/thing.rb

#urlAddressable::URI?

Returns the URL of the schema object.

Returns:

  • (Addressable::URI, nil)

    the URL of the schema object


67
68
69
70
71
72
73
74
75
# File 'lib/html2rss/auto_source/scraper/schema/thing.rb', line 67

def url
  url = schema_object[:url]
  if url.to_s.empty?
    Log.debug("Schema#Thing.url: no url in schema_object: #{schema_object.inspect}")
    return
  end

  Utils.build_absolute_url_from_relative(url, @url)
end