Class: Commento::Report
- Inherits:
-
Object
- Object
- Commento::Report
- Defined in:
- lib/commento/report.rb
Direct Known Subclasses
Constant Summary collapse
- COMMENTO_FOLDER_NAME =
'commento'
Instance Method Summary collapse
- #create_report ⇒ Object
-
#initialize(data_scraper: Commento::Scrapers::Ruby.new) ⇒ Report
constructor
A new instance of Report.
Constructor Details
Instance Method Details
#create_report ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/commento/report.rb', line 11 def create_report @commento_data = @data_scraper.call FileUtils.mkdir_p(COMMENTO_FOLDER_NAME) File.write( "#{COMMENTO_FOLDER_NAME}/#{file_name}", main_template.gsub('%tables_placeholder%', tables_placeholder) ) end |