Class: Debtective::Comments::Export
- Inherits:
-
Object
- Object
- Debtective::Comments::Export
- Includes:
- StderrHelper
- Defined in:
- lib/debtective/comments/export.rb
Overview
Export comments in a JSON file and to stdout
Constant Summary collapse
- OPTIONS =
{ user_name: nil, quiet: false, included_types: [], excluded_types: [], included_paths: [], excluded_paths: [] }.freeze
- FILE_PATH =
"comments.json"
Instance Method Summary collapse
- #call ⇒ void
-
#initialize(**options) ⇒ Export
constructor
A new instance of Export.
Methods included from StderrHelper
Constructor Details
Instance Method Details
#call ⇒ void
This method returns an undefined value.
40 41 42 43 44 45 46 47 48 49 |
# File 'lib/debtective/comments/export.rb', line 40 def call # suppress_stderr prevents stderr outputs from compilations suppress_stderr do @comments = @quiet ? find_comments : log_table end filter_comments! log_counts unless @quiet write_json_file puts(FILE_PATH) unless @quiet end |