Class: CineworldUk::Internal::WhatsonParser Private
- Inherits:
-
Object
- Object
- CineworldUk::Internal::WhatsonParser
- 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 > .row:not(.schedule)'- SCREENINGS_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 screenings html chunks
'#filter-reload > .span9 > .schedule'
Instance Method Summary collapse
-
#films_with_screenings ⇒ Array<String>
private
break up the whats on page into individual chunks for each film.
-
#initialize(cinema_id) ⇒ WhatsonParser
constructor
private
A new instance of WhatsonParser.
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.
13 14 15 |
# File 'lib/cineworld_uk/internal/whatson_parser.rb', line 13 def initialize(cinema_id) @cinema_id = cinema_id end |
Instance Method Details
#films_with_screenings ⇒ Array<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
19 20 21 22 23 |
# File 'lib/cineworld_uk/internal/whatson_parser.rb', line 19 def films_with_screenings films_html.each_with_index.map do |html, i| html + screenings_html[i] end end |