Class: CodeOwnership::Private::ForFileOutputBuilder
- Inherits:
-
Object
- Object
- CodeOwnership::Private::ForFileOutputBuilder
- Extended by:
- T::Sig
- Defined in:
- lib/code_ownership/private/for_file_output_builder.rb
Constant Summary collapse
- UNOWNED_OUTPUT =
T.let( { team_name: 'Unowned', team_yml: 'Unowned' }, T::Hash[Symbol, T.untyped] )
Class Method Summary collapse
Instance Method Summary collapse
- #build ⇒ Object
-
#initialize(file_path:, json:, verbose:) ⇒ ForFileOutputBuilder
constructor
A new instance of ForFileOutputBuilder.
Constructor Details
#initialize(file_path:, json:, verbose:) ⇒ ForFileOutputBuilder
Returns a new instance of ForFileOutputBuilder.
13 14 15 16 17 |
# File 'lib/code_ownership/private/for_file_output_builder.rb', line 13 def initialize(file_path:, json:, verbose:) @file_path = file_path @json = json @verbose = verbose end |
Class Method Details
.build(file_path:, json:, verbose:) ⇒ Object
20 21 22 |
# File 'lib/code_ownership/private/for_file_output_builder.rb', line 20 def self.build(file_path:, json:, verbose:) new(file_path: file_path, json: json, verbose: verbose).build end |
Instance Method Details
#build ⇒ Object
33 34 35 36 37 38 39 |
# File 'lib/code_ownership/private/for_file_output_builder.rb', line 33 def build result_hash = @verbose ? build_verbose : build_terse return result_hash.to_json if @json (result_hash) end |