class Jekyll::IcalTag::CalendarFetcher
Attributes
url[R]
Public Class Methods
new(url)
click to toggle source
# File lib/jekyll-ical-tag/calendar_fetcher.rb, line 10 def initialize(url) @url = CGI.unescape(url) raise "No URL provided or in innapropriate form '#{url}'" unless is_valid_url? end
Public Instance Methods
fetch()
click to toggle source
# File lib/jekyll-ical-tag/calendar_fetcher.rb, line 16 def fetch puts "Fetching #{url}" @fetch ||= APICache.get(url) end
Private Instance Methods
is_valid_url?()
click to toggle source
# File lib/jekyll-ical-tag/calendar_fetcher.rb, line 25 def is_valid_url? !!(url =~ URI::regexp) end