Class: SimpleCrawler::Document
- Inherits:
-
Object
- Object
- SimpleCrawler::Document
- Defined in:
- lib/document.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
Returns the value of attribute data.
-
#fetched_at ⇒ Object
Returns the value of attribute fetched_at.
-
#headers ⇒ Object
Returns the value of attribute headers.
-
#http_status ⇒ Object
Returns the value of attribute http_status.
-
#uri ⇒ Object
Returns the value of attribute uri.
Instance Method Summary collapse
Instance Attribute Details
#data ⇒ Object
Returns the value of attribute data.
3 4 5 |
# File 'lib/document.rb', line 3 def data @data end |
#fetched_at ⇒ Object
Returns the value of attribute fetched_at.
3 4 5 |
# File 'lib/document.rb', line 3 def fetched_at @fetched_at end |
#headers ⇒ Object
Returns the value of attribute headers.
3 4 5 |
# File 'lib/document.rb', line 3 def headers @headers end |
#http_status ⇒ Object
Returns the value of attribute http_status.
3 4 5 |
# File 'lib/document.rb', line 3 def http_status @http_status end |
#uri ⇒ Object
Returns the value of attribute uri.
3 4 5 |
# File 'lib/document.rb', line 3 def uri @uri end |
Instance Method Details
#to_s ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/document.rb', line 5 def to_s puts "Document" puts " .uri:\t\t#{uri}" puts " .fetched_at:\t#{fetched_at}" puts " .http_status:\t#{http_status}" puts " .headers:" for header in headers puts " #{header[0]}: #{header[1]}" end puts " .data.length:\t#{(data.length)}" end |