Class: Movies::Search
- Inherits:
-
Object
- Object
- Movies::Search
- Defined in:
- lib/movies.rb
Instance Method Summary collapse
Instance Method Details
#agent ⇒ Object
14 15 16 |
# File 'lib/movies.rb', line 14 def agent Mechanize.new end |
#film_links ⇒ Object
6 7 8 |
# File 'lib/movies.rb', line 6 def film_links page.links_with(class: 'film-name') end |
#films ⇒ Object
10 11 12 |
# File 'lib/movies.rb', line 10 def films film_links.map(&:text) end |
#page ⇒ Object
18 19 20 |
# File 'lib/movies.rb', line 18 def page agent.get("http://www.123phim.vn/phim") end |