Class: PicturehouseUk::Internal::CinemaPage Private

Inherits:
Object
  • Object
show all
Defined in:
lib/picturehouse_uk/internal/cinema_page.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Parses a chunk of HTML to derive movie showing data

Constant Summary collapse

FILM_CSS =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

css for a film + screenings

'#events .largelist .item'

Instance Method Summary collapse

Constructor Details

#initialize(cinema_id) ⇒ CinemaPage

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of CinemaPage.

Parameters:

  • cinema_id (Integer)

    cineworld cinema id



10
11
12
# File 'lib/picturehouse_uk/internal/cinema_page.rb', line 10

def initialize(cinema_id)
  @cinema_id = cinema_id
end

Instance Method Details

#film_htmlArray<String>

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

break up the page into individual chunks for each film

Returns:

  • (Array<String>)

    html chunks for a film and it’s screenings



16
17
18
# File 'lib/picturehouse_uk/internal/cinema_page.rb', line 16

def film_html
  film_nodes.map { |n| n.to_s.gsub(/^\s+/, '') }
end