Class: BrowserCrawler::Reports::YamlReport
- Inherits:
-
Object
- Object
- BrowserCrawler::Reports::YamlReport
- Defined in:
- lib/browser_crawler/reports/yaml_report.rb
Overview
It involves methods which allow to save a store to an yaml file
Instance Method Summary collapse
- #export(save_folder_path:) ⇒ Object
-
#initialize(store:) ⇒ YamlReport
constructor
A new instance of YamlReport.
Constructor Details
#initialize(store:) ⇒ YamlReport
Returns a new instance of YamlReport.
5 6 7 |
# File 'lib/browser_crawler/reports/yaml_report.rb', line 5 def initialize(store:) @store = store end |
Instance Method Details
#export(save_folder_path:) ⇒ Object
9 10 11 12 |
# File 'lib/browser_crawler/reports/yaml_report.rb', line 9 def export(save_folder_path:) File.write("#{save_folder_path}/crawler_report.yaml", @store.to_h.to_yaml) end |