Skip to content

Commit

Permalink
#108 renamed class using conventions
Browse files Browse the repository at this point in the history
  • Loading branch information
c71n93 committed Mar 16, 2023
1 parent b67a29f commit 859549b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/main/kotlin/org/objectionary/ddr/launch/Combiner.kt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import org.objectionary.ddr.graph.CondAttributesSetter
import org.objectionary.ddr.graph.GraphBuilder
import org.objectionary.ddr.graph.InnerPropagator
import org.objectionary.ddr.graph.repr.Graph
import org.objectionary.ddr.sources.SourcesDdr
import org.objectionary.ddr.sources.SrsTransformed
import org.objectionary.ddr.transform.XslTransformer
import org.objectionary.ddr.transform.impl.BasicDecoratorsResolver
import org.objectionary.ddr.transform.impl.CondNodesResolver
Expand Down Expand Up @@ -68,8 +68,8 @@ fun buildGraph(
gather: Boolean = true,
postfix: String = "ddr"
): Graph {
val sources = SourcesDdr(path, XslTransformer(), postfix, gather)
sources.walkSources()
val sources = SrsTransformed(path, XslTransformer(), postfix, gather)
sources.walk()
documents = sources.documents
val builder = GraphBuilder(documents)
builder.createGraph()
Expand Down
6 changes: 3 additions & 3 deletions src/main/kotlin/org/objectionary/ddr/sources/Sources.kt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ interface Sources {
*
* @return [MutableMap] with collected documents as key and their filenames as value
*/
fun walkSources(): MutableMap<Document, String>
fun walk(): MutableMap<Document, String>
}

/**
Expand All @@ -31,7 +31,7 @@ interface Sources {
* @param postfix postfix of the resulting directory
* @param gather if outputs should be gathered
*/
class SourcesDdr(
class SrsTransformed(
strPath: String,
private val transformer: XslTransformer,
private val postfix: String = "ddr",
Expand All @@ -50,7 +50,7 @@ class SourcesDdr(
*
* @return [MutableMap] with collected [documents] as key and their filenames as value
*/
override fun walkSources(): MutableMap<Document, String> {
override fun walk(): MutableMap<Document, String> {
Files.walk(path)
.filter(Files::isRegularFile)
.forEach {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.objectionary.ddr.unit.sources.tempdir

import org.objectionary.ddr.TestBase
import org.objectionary.ddr.sources.SourcesDdr
import org.objectionary.ddr.sources.SrsTransformed
import org.objectionary.ddr.transform.XslTransformer
import java.io.File
import java.nio.file.Path
Expand All @@ -16,7 +16,7 @@ open class TempDirectoryBase : TestBase {
val path = constructInPath(getTestName()) + sep.toString().repeat(i)
deleteTempDirIfExists(Path.of(path))
val postfix = "ddr"
SourcesDdr(path, XslTransformer(), postfix, false).walkSources()
SrsTransformed(path, XslTransformer(), postfix, false).walk()
checkIfTempDirExists(Path.of(path))
deleteTempDirIfExists(Path.of(path))
}
Expand Down

1 comment on commit 859549b

@0pdd
Copy link

@0pdd 0pdd commented on 859549b Mar 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Puzzle 108-df904ef6 discovered in src/main/kotlin/org/objectionary/ddr/launch/LaunchDdr.kt) and submitted as #111. Please, remember that the puzzle was not necessarily added in this particular commit. Maybe it was added earlier, but we discovered it only now.

Please sign in to comment.