Class: CineworldUk::Internal::WhatsonParser Private

Inherits:
Object
  • Object
show all
Defined in:
lib/cineworld_uk/internal/whatson_parser.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 selector for film html chunks

'#filter-reload > .span9 > .film'

Instance Method Summary collapse

Constructor Details

#initialize(cinema_id) ⇒ WhatsonParser

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 WhatsonParser.

Parameters:

  • cinema_id (Integer)

    cineworld cinema id



11
12
13
# File 'lib/cineworld_uk/internal/whatson_parser.rb', line 11

def initialize(cinema_id)
  @cinema_id = cinema_id
end

Instance Method Details

#films_with_screeningsArray<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 whats on page into individual chunks for each film

Returns:

  • (Array<String>)

    html chunks for a film and it’s screenings



17
18
19
# File 'lib/cineworld_uk/internal/whatson_parser.rb', line 17

def films_with_screenings
  films_html
end