Sha256: c9918d201e7a750646b64d104582e6748ed03fa3d4ba5bc4cd0db3e15767d1ed
Contents?: true
Size: 1.22 KB
Versions: 2
Compression:
Stored size: 1.22 KB
Contents
module OdeonUk # Public: The object representing a screening of a film on the Odeon UK website class Screening # Public: Returns the booking URL on the cinema website attr_reader :booking_url # Public: Returns the String name of the cinema attr_reader :cinema_name # Public: Returns the String name of the film attr_reader :film_name # Public: Returns the Time of the screening attr_reader :when # Public: Returns the Type of screening (3d, baby, kids, live) attr_reader :varient # Public: Initialize a screening # # film_name - String of the film name # cinema_name - String of the cinema name on the Odeon website # time - Time representing the time of the screening (24 hour clock) # varient - String representing the type of showing (e.g. 3d/baby/live) def initialize(film_name, cinema_name, time, booking_url=nil, varient=nil) @cinema_name, @film_name, @varient = cinema_name, film_name, varient @booking_url = booking_url @when = time.utc? ? time : TZInfo::Timezone.get('Europe/London').local_to_utc(time) end # Public: The Date of the screening # # Returns a Date def date @when.to_date end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
odeon_uk-1.1.2 | lib/odeon_uk/screening.rb |
odeon_uk-1.1.1 | lib/odeon_uk/screening.rb |