-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: #98 Generate the non-standard dictionaries exporters dynamicall…
…y, based on config. Pass the `PlayerVocabularyStatsRepository` from `StatisticsGenerator`.
- Loading branch information
1 parent
951ede1
commit c51517a
Showing
7 changed files
with
99 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
...otlin/ru/klavogonki/statistics/export/vocabulary/NonStandardVocabularyGeneratorContext.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package ru.klavogonki.statistics.export.vocabulary | ||
|
||
import ru.klavogonki.statistics.export.vocabulary.non_standard.NonStandardVocabularyTopExporter | ||
|
||
data class NonStandardVocabularyGeneratorContext( | ||
@JvmField val dictionaryIdToExporter: Map<Int, NonStandardVocabularyTopExporter> | ||
) { | ||
fun getExporter(dictionaryId: Int): NonStandardVocabularyTopExporter = | ||
dictionaryIdToExporter[dictionaryId] | ||
?: error( | ||
"No non-standard dictionary generator for dictionaryId = $dictionaryId." + | ||
" Please check you generator config." | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters