Sha256: 1cda4fadc70f99754eb9fe4edad2fd84f640e22e163b9ea1292f1497b35f7021
Contents?: true
Size: 1.17 KB
Versions: 1
Compression:
Stored size: 1.17 KB
Contents
module CineworldUk # The object representing a single screening on the Cineworld UK website class Screening # @return [String] the booking URL on the cinema website attr_reader :booking_url # @return [String] the cinema name attr_reader :cinema_name # @return [String] the film name attr_reader :film_name # @return [Time] the UTC time of the screening attr_reader :when # @return [String] the type of screening (2D, 3D, IMAX...) attr_reader :varient # @param [String] film_name the film name # @param [String] cinema_name the cinema name # @param [Time] time datetime of the screening (UTC preferred) # @param [String] booking_url direct link to the booking page for this screening # @param [String] varient the type of showing (e.g. 3d/baby/live) def initialize(film_name, cinema_name, time, booking_url=nil, varient=nil) @booking_url, @cinema_name, @film_name, @varient = booking_url, cinema_name, film_name, varient @when = time.utc? ? time : TZInfo::Timezone.get('Europe/London').local_to_utc(time) end # The date of the screening # @return [Date] def date @when.to_date end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
cineworld_uk-1.0.0 | lib/cineworld_uk/screening.rb |