Class: OdeonUk::Internal::ScreeningNodeParser Private

Inherits:
Object
  • Object
show all
Defined in:
lib/odeon_uk/internal/film_with_screenings_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 single screening

Constant Summary collapse

TIME_REGEX =

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.

regex for time format

%r(\d+/\d+/\d+ \d{2}\:\d{2})
DBOX_REGEX =

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.

regex for D-Box screenings

/D-Box/

Instance Method Summary collapse

Constructor Details

#initialize(node) ⇒ ScreeningNodeParser

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

Parameters:

  • node (Nokigiri::Node)

    a Nokogiri node object



110
111
112
# File 'lib/odeon_uk/internal/film_with_screenings_parser.rb', line 110

def initialize(node)
  @node = node
end

Instance Method Details

#to_hashHash

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.

hashes of screening attributes

Returns:

  • (Hash)


116
117
118
119
120
121
122
# File 'lib/odeon_uk/internal/film_with_screenings_parser.rb', line 116

def to_hash
  {
    booking_url: booking_url,
    time:        utc_time,
    variant:     variant
  }
end