Class: Webshaker::ScrapeResult

Inherits:
Object
  • Object
show all
Defined in:
lib/webshaker/scrape_result.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(screenshot, html) ⇒ ScrapeResult

Returns a new instance of ScrapeResult.



5
6
7
8
# File 'lib/webshaker/scrape_result.rb', line 5

def initialize(screenshot, html)
  @screenshot = screenshot
  @html = html
end

Instance Attribute Details

#htmlObject

Returns the value of attribute html.



3
4
5
# File 'lib/webshaker/scrape_result.rb', line 3

def html
  @html
end

#screenshotObject

Returns the value of attribute screenshot.



3
4
5
# File 'lib/webshaker/scrape_result.rb', line 3

def screenshot
  @screenshot
end

Instance Method Details

#save_to(output_dir_path) ⇒ Object



10
11
12
13
# File 'lib/webshaker/scrape_result.rb', line 10

def save_to(output_dir_path)
  save_shot(output_dir_path)
  save_html(output_dir_path)
end