Class: Watchmob::Page

Inherits:
Object
  • Object
show all
Defined in:
lib/watchmob/page.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#documentObject (readonly)

Returns the value of attribute document.



15
16
17
# File 'lib/watchmob/page.rb', line 15

def document
  @document
end

#uriObject (readonly)

Returns the value of attribute uri.



14
15
16
# File 'lib/watchmob/page.rb', line 14

def uri
  @uri
end