Skip to content

Commit

Permalink
feat(domain): add lsot commit
Browse files Browse the repository at this point in the history
  • Loading branch information
phodal committed Mar 6, 2022
1 parent 6d2a710 commit ce2516d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ open class CodeDataStruct(
return this.Package + "." + this.NodeName
}

fun extension(): String {
fun fileExt(): String {
return this.FilePath.substringAfterLast('.', "")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import kotlinx.serialization.json.jsonObject
@Serializable
open class CodeFunction(
var Name: String = "",
var FilePath: String = "",
var Package: String = "",
var ReturnType: String = "",
var MultipleReturns: Array<CodeProperty> = arrayOf(),
Expand Down Expand Up @@ -99,4 +100,8 @@ open class CodeFunction(

this.LocalVariables = vars
}

fun fileExt(): String {
return this.FilePath.substringAfterLast('.', "")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@ internal class CodeDataStructTest {
@Test
internal fun shouldGetFileExt() {
val ds = CodeDataStruct(NodeName = "FunctionMap", FilePath = "src/main.java")
assertEquals("java", ds.extension());
assertEquals("java", ds.fileExt());
}
}

0 comments on commit ce2516d

Please # to comment.