Sha256: 542a2fad5f8bb83b08106330d1bc6249f9bb39622c5f04946cbbcd74493a9c2e

Contents?: true

Size: 658 Bytes

Versions: 1

Compression:

Stored size: 658 Bytes

Contents

require 'open-uri'

module PicturehouseUk
  # @api private
  module Internal
    # fetches pages from the picturehouse.co.uk website
    class Website
      # get the cinema page with showings for passed id
      # @return [String]
      def cinema(id)
        get("cinema/#{id}")
      end

      # get the cinema contact information page for passed id
      # @return [String]
      def info(id)
        get("cinema/info/#{id}")
      end

      # get the home page
      # @return [String]
      def home
        get(nil)
      end

      private

      def get(path)
        open("https://www.picturehouses.com/#{path}").read
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
picturehouse_uk-3.0.2 lib/picturehouse_uk/internal/website.rb