lib/fandango.rb in fandango-0.1.8 vs lib/fandango.rb in fandango-0.1.9
- old
+ new
@@ -6,9 +6,10 @@
module Fandango
class << self
def movies_near(postal_code)
+ raise ArgumentError, "postal code cannot be blank" if postal_code.nil? || postal_code == ''
feed = fetch_and_parse(postal_code)
feed.entries.map do |entry|
parser = Parser.new(entry)
hash = {}
hash[:theater] = parser.parse_theater