Class: Eventify::Provider::SolarisKino

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

Constant Summary collapse

URL =
"http://solariskino.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

.fetch ⇒ Object



9
10
11
12
13
14
15
16
17
18
# File 'lib/eventify/provider/solaris_kino.rb', line 9

def fetch
  doc = Nokogiri::HTML(open(URI.join(URL, "et/tulemas/")))
  poster_movie = movie doc.at(".info")

  other_movies = doc.search(".item").map do |div|
    movie div
  end

  [poster_movie].concat other_movies
end