Class: Feed::Google::ReviewGenerator
- Inherits:
-
BaseService
- Object
- BaseService
- Feed::Google::ReviewGenerator
- Defined in:
- app/services/feed/google/review_generator.rb
Overview
Service object: review generator.
Defined Under Namespace
Classes: Result
Instance Method Summary collapse
-
#process(limit: nil, output_file_path: nil, locale: :'en-US') ⇒ Object
rubocop:disable Lint/UnusedMethodArgument.
Instance Method Details
#process(limit: nil, output_file_path: nil, locale: :'en-US') ⇒ Object
rubocop:disable Lint/UnusedMethodArgument
10 11 12 13 14 15 16 17 18 19 20 |
# File 'app/services/feed/google/review_generator.rb', line 10 def process(limit: nil, output_file_path: nil, locale: :'en-US') # rubocop:disable Lint/UnusedMethodArgument xml_data = build_empty_xml if output_file_path File.open(output_file_path, 'wb') do |file| file.write xml_data file.flush file.fsync end end Result.new(output: xml_data, output_file_path:, product_reviews_count: 0) end |