Module: HttpCapture

Included in:
Client
Defined in:
lib/google_movies/http_capture.rb

Defined Under Namespace

Classes: Client

Instance Method Summary collapse

Instance Method Details

#get_information(url) ⇒ Object



16
17
18
19
20
21
22
23
24
25
# File 'lib/google_movies/http_capture.rb', line 16

def get_information(url)
  @movies_theater = []
  @doc = page_doc(@http_address)
  @doc.search('div[@class="theater"]').each do |theater|
    movies = []
    movies = get_movies(theater)
    @movies_theater << create_movie_theater_with(theater, movies)
  end
  @movies_theater
end

#movies_theaters(page_url) ⇒ Object



11
12
13
14
# File 'lib/google_movies/http_capture.rb', line 11

def movies_theaters(page_url)
  @http_address = URI.parse(URI.encode(page_url.strip))
  get_information(@http_address)
end