Class: GitlabQuality::TestTooling::CodeCoverage::CoverageData
- Inherits:
-
Object
- Object
- GitlabQuality::TestTooling::CodeCoverage::CoverageData
- Defined in:
- lib/gitlab_quality/test_tooling/code_coverage/coverage_data.rb
Constant Summary collapse
- RESPONSIBLE =
'responsible'- DEPENDENT =
'dependent'
Instance Method Summary collapse
-
#as_db_table ⇒ Array<Hash<Symbol, String>>
Mapping of column name to row value.
-
#initialize(code_coverage_by_source_file, source_file_to_tests, tests_to_feature_categories, feature_categories_to_teams, source_file_types = {}, test_classifications = {}) ⇒ CoverageData
constructor
A new instance of CoverageData.
Constructor Details
#initialize(code_coverage_by_source_file, source_file_to_tests, tests_to_feature_categories, feature_categories_to_teams, source_file_types = {}, test_classifications = {}) ⇒ CoverageData
Returns a new instance of CoverageData.
22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/gitlab_quality/test_tooling/code_coverage/coverage_data.rb', line 22 def initialize( code_coverage_by_source_file, source_file_to_tests, tests_to_feature_categories, feature_categories_to_teams, source_file_types = {}, test_classifications = {} ) @code_coverage_by_source_file = code_coverage_by_source_file @source_file_to_tests = source_file_to_tests @tests_to_feature_categories = tests_to_feature_categories @feature_categories_to_teams = feature_categories_to_teams @source_file_types = source_file_types @test_classifications = test_classifications end |
Instance Method Details
#as_db_table ⇒ Array<Hash<Symbol, String>>
Returns Mapping of column name to row value.
53 54 55 |
# File 'lib/gitlab_quality/test_tooling/code_coverage/coverage_data.rb', line 53 def as_db_table all_files.flat_map { |file| records_for_file(file) } end |