Class: TpbWrap::Page
Instance Attribute Summary collapse
-
#body ⇒ Object
Returns the value of attribute body.
Instance Method Summary collapse
Instance Attribute Details
#body ⇒ Object
Returns the value of attribute body.
4 5 6 |
# File 'lib/tpb_wrap/page.rb', line 4 def body @body end |
Instance Method Details
#first_source ⇒ Object
11 12 13 14 |
# File 'lib/tpb_wrap/page.rb', line 11 def first_source link = doc.css("a.detLink").first Source.new(:page_url => link.attribute("href")) end |
#url=(url) ⇒ Object
5 6 7 |
# File 'lib/tpb_wrap/page.rb', line 5 def url=(url) self.body = open(url).read end |