Class: Omelete::MovieTheaterAgent
- Inherits:
-
Object
- Object
- Omelete::MovieTheaterAgent
- Defined in:
- lib/omelete/movie_theater_agent.rb
Instance Method Summary collapse
-
#initialize(omelete_id) ⇒ MovieTheaterAgent
constructor
A new instance of MovieTheaterAgent.
- #movie_theater ⇒ Object
Constructor Details
#initialize(omelete_id) ⇒ MovieTheaterAgent
Returns a new instance of MovieTheaterAgent.
11 12 13 14 15 |
# File 'lib/omelete/movie_theater_agent.rb', line 11 def initialize(omelete_id) client = Client.new @id = omelete_id @page_doc = client.page_doc("cinema/#{@id}") end |
Instance Method Details
#movie_theater ⇒ Object
17 18 19 20 21 22 23 24 25 |
# File 'lib/omelete/movie_theater_agent.rb', line 17 def movie_theater if @page_doc name = @page_doc.css("div[class='programacao_cinema'] h2 a").text values = @page_doc.css("div#tab_#{@id}_ingressos dl dd").text @movie_theater = MovieTheaterInfo.new @id, name, values else nil end end |