Sha256: 947aec9c0997979adcd883375abbf5e60fef0819121805e4ad1306ece04821af
Contents?: true
Size: 515 Bytes
Versions: 9
Compression:
Stored size: 515 Bytes
Contents
# encoding: utf-8 # frozen_string_literal: true require "cgi" require "api_cache" module Jekyll class IcalTag class CalendarFetcher def initialize(url) @url = CGI.unescape(url) raise "No URL provided or in innapropriate form '#{url}'" unless is_valid_url? end def fetch puts "Fetching #{url}" @fetch ||= APICache.get(url) end private attr_reader :url def is_valid_url? !!(url =~ URI::regexp) end end end end
Version data entries
9 entries across 8 versions & 1 rubygems