File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
surf-api-core/surf-api-core-api/src/main/kotlin/dev/slne/surf/surfapi/core/api/config Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,12 @@ import kotlin.reflect.KClass
1313 * @param configFolder The folder where the configuration file is located.
1414 * @param fileName The name of the configuration file in YAML format.
1515 *
16- * Use in your main: val myConfig = surfConfigApi.createYmlConfig<MyConfigClass>(configFolderPath)
16+ * Example usage:
17+ * ```
18+ * import dev.slne.surf.surfapi.core.api.config.surfConfigApi
19+ *
20+ * val myConfig = surfConfigApi.createYmlConfig<MyConfigClass>(configFolderPath)
21+ * ```
1722 */
1823class YmlConfigWrapper <T : Any >(
1924 private val clazz : KClass <T >,
@@ -60,7 +65,6 @@ class YmlConfigWrapper<T : Any>(
6065 * @param block A lambda function defining the modifications to be applied to the configuration object.
6166 */
6267 fun edit (save : Boolean = true, block : T .() -> Unit ) {
63- val config = config
6468 config.block()
6569
6670 if (save) {
You can’t perform that action at this time.
0 commit comments