Class: OdeonUk::Performance
- Inherits:
-
Cinebase::Performance
- Object
- Cinebase::Performance
- OdeonUk::Performance
- Defined in:
- lib/odeon_uk/performance.rb
Overview
The object representing a single screening of a film on the Odeon UK website
Instance Attribute Summary collapse
-
#booking_url ⇒ String
readonly
The booking URL on the cinema website.
-
#cinema_id ⇒ String
readonly
The cinema id.
-
#cinema_name ⇒ String
readonly
The cinema name.
-
#dimension ⇒ String
readonly
2d or 3d.
-
#film_name ⇒ String
readonly
The film name.
Class Method Summary collapse
-
.at(cinema_id) ⇒ Array<OdeonUk::Performance>
All currently listed films showing at a cinema.
Instance Method Summary collapse
- #initialize(options) ⇒ Object constructor
-
#showing_on ⇒ Date
The date of the screening.
-
#starting_at ⇒ Time
UTC time of the screening.
-
#variant ⇒ Array[String]
The kinds of screening (IMAX, kids, baby, senior).
Constructor Details
#initialize(options) ⇒ Object
|
# File 'lib/odeon_uk/performance.rb', line 15
|
Instance Attribute Details
#booking_url ⇒ String (readonly)
Returns the booking URL on the cinema website.
|
# File 'lib/odeon_uk/performance.rb', line 4
|
#cinema_id ⇒ String (readonly)
Returns the cinema id.
|
# File 'lib/odeon_uk/performance.rb', line 4
|
#cinema_name ⇒ String (readonly)
Returns the cinema name.
|
# File 'lib/odeon_uk/performance.rb', line 4
|
#dimension ⇒ String (readonly)
Returns 2d or 3d.
|
# File 'lib/odeon_uk/performance.rb', line 4
|
#film_name ⇒ String (readonly)
Returns the film name.
|
# File 'lib/odeon_uk/performance.rb', line 4
|
Class Method Details
.at(cinema_id) ⇒ Array<OdeonUk::Performance>
All currently listed films showing at a cinema
27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/odeon_uk/performance.rb', line 27 def self.at(cinema_id) cinema_id = cinema_id.to_i film_ids_at(cinema_id).flat_map do |film_id| api_response.film_times(cinema_id, film_id).flat_map do |day| performance_days(day).map do |hash| new(hash.merge(cinema_hash(cinema_id)) .merge(film_name: film_name(film_id))) end end end end |
Instance Method Details
#showing_on ⇒ Date
The date of the screening
|
# File 'lib/odeon_uk/performance.rb', line 39
|
#starting_at ⇒ Time
UTC time of the screening
|
# File 'lib/odeon_uk/performance.rb', line 43
|
#variant ⇒ Array[String]
The kinds of screening (IMAX, kids, baby, senior)
|
# File 'lib/odeon_uk/performance.rb', line 47
|