Class: Eventify::Provider::FBI

Inherits:
Base
  • Object
show all
Defined in:
lib/eventify/provider/fbi.rb

Constant Summary collapse

URL =
"http://www.fbi.ee/"

Constants inherited from Base

Base::MissingAttributeError

Instance Attribute Summary

Attributes inherited from Base

#date, #id, #link, #title

Class Method Summary collapse

Methods inherited from Base

#<=>, #==, #exists?, #hash, #initialize, #provider, #save

Constructor Details

This class inherits a constructor from Eventify::Provider::Base

Class Method Details

.fetchObject



9
10
11
12
13
14
# File 'lib/eventify/provider/fbi.rb', line 9

def fetch
  doc = Nokogiri::HTML(open(URL))
  doc.search(".article-list li h2 a").map do |a|
    new id: a["href"], title: a.content, link: a["href"], date: Time.now
  end
end