Class: Jekyll::IcalTag::CalendarFetcher

Inherits:
Object
  • Object
show all
Defined in:
lib/jekyll-ical-tag/calendar_fetcher.rb

Instance Method Summary collapse

Constructor Details

#initialize(url) ⇒ CalendarFetcher

Returns a new instance of CalendarFetcher.



10
11
12
13
14
# 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

Instance Method Details

#fetchObject



16
17
18
19
# File 'lib/jekyll-ical-tag/calendar_fetcher.rb', line 16

def fetch
  puts "Fetching #{url}"
  @fetch ||= APICache.get(url)
end