Class: Watchmob::Page
- Inherits:
-
Object
- Object
- Watchmob::Page
- Defined in:
- lib/watchmob/page.rb
Direct Known Subclasses
AukroPage, GSMArenaPage, GSMArenaSearchPage, HeurekaPage, HeurekaSearchPage
Instance Attribute Summary collapse
-
#document ⇒ Object
readonly
Returns the value of attribute document.
-
#uri ⇒ Object
readonly
Returns the value of attribute uri.
Instance Method Summary collapse
-
#initialize(uri) ⇒ Page
constructor
A new instance of Page.
Constructor Details
#initialize(uri) ⇒ Page
Returns a new instance of Page.
7 8 9 10 11 12 |
# File 'lib/watchmob/page.rb', line 7 def initialize(uri) @uri = uri Log.waiting("get #@uri") do @document = Nokogiri::HTML.parse(open(uri)) end end |
Instance Attribute Details
#document ⇒ Object (readonly)
Returns the value of attribute document.
15 16 17 |
# File 'lib/watchmob/page.rb', line 15 def document @document end |
#uri ⇒ Object (readonly)
Returns the value of attribute uri.
14 15 16 |
# File 'lib/watchmob/page.rb', line 14 def uri @uri end |