Class: CineworldUk::Internal::Parser::Api::CinemaAddress Private

Inherits:
Object
  • Object
show all
Defined in:
lib/cineworld_uk/internal/parser/api/cinema_address.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 string to derive address

Instance Method Summary collapse

Constructor Details

#initialize(id) ⇒ CineworldUk::Internal::Parser::Api::CinemaAddress

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.

Parameters:

  • id (Integer)

    the cinema id



10
11
12
# File 'lib/cineworld_uk/internal/parser/api/cinema_address.rb', line 10

def initialize(id)
  @id = id
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.

Note:

Uses the address naming from microformats.org/wiki/adr

:locality, :postal_code, :country

Returns:

  • (Hash)

    contains :street_address, :extended_address,



17
18
19
20
21
22
23
24
25
26
# File 'lib/cineworld_uk/internal/parser/api/cinema_address.rb', line 17

def to_hash
  {
    street_address:   street_address,
    extended_address: extended_address,
    locality:         locality,
    region:           region,
    postal_code:      postal_code,
    country:          'United Kingdom'.freeze
  }
end