lib/picturehouse_uk/film.rb in picturehouse_uk-2.0.5 vs lib/picturehouse_uk/film.rb in picturehouse_uk-3.0.0

- old
+ new

@@ -17,13 +17,11 @@ # Films at a single cinema # @param [String] cinema_id the id of the cinema # @return [Array<PicturehouseUk::Film>] def self.at(cinema_id) - cinema_page(cinema_id).film_html.map do |html| - new(Internal::FilmWithScreeningsParser.new(html).film_name) - end.uniq + screenings(cinema_id).map { |hash| new hash[:film_name] }.uniq end # Allows sort on objects # @param [PicturehouseUk::Film] other another film object # @return [Integer] -1, 0 or 1 @@ -52,10 +50,10 @@ slug.hash end private - def self.cinema_page(cinema_id) - @cinema_page ||= PicturehouseUk::Internal::CinemaPage.new(cinema_id) + def self.screenings(cinema_id) + PicturehouseUk::Internal::Parser::Screenings.new(cinema_id).to_a end end end