Sha256: aa04316a3399648d6b0165379e7ba22a869386656a5b9b8f15465283634fc9fe
Contents?: true
Size: 564 Bytes
Versions: 9
Compression:
Stored size: 564 Bytes
Contents
require "fandango/version" require 'feedzirra' require 'fandango/parser' module Fandango class << self def movies_near(postal_code) feed = fetch_and_parse(postal_code) feed.entries.map do |entry| parser = Parser.new(entry) hash = {} hash[:theater] = parser.parse_theater hash[:movies] = parser.parse_movies hash end end private def fetch_and_parse(postal_code) Feedzirra::Feed.fetch_and_parse("http://www.fandango.com/rss/moviesnearme_#{postal_code}.rss") end end end
Version data entries
9 entries across 9 versions & 1 rubygems