Skip to content

Commit

Permalink
make tethys.FieldStyle companion non private
Browse files Browse the repository at this point in the history
  • Loading branch information
Ковалев Георгий Алексеевич committed Nov 11, 2024
1 parent 7370dd6 commit 2164297
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/core/src/main/scala-3/tethys/FieldStyle.scala
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ enum FieldStyle {
case SnakeCase, LowerSnakeCase, UpperSnakeCase, CapitalizedSnakeCase
}

private[tethys] object FieldStyle:
object FieldStyle:
private val regexp1: Pattern = Pattern.compile("([A-Z]+)([A-Z][a-z])")
private val regexp2: Pattern = Pattern.compile("([a-z\\d])([A-Z])")
private val replacement: String = "$1_$2"
Expand All @@ -22,7 +22,7 @@ private[tethys] object FieldStyle:
private val lowercase: String => String = _.toLowerCase()
private val uppercase: String => String = _.toUpperCase()

def applyStyle(string: String, style: FieldStyle): String =
private[tethys] def applyStyle(string: String, style: FieldStyle): String =
style match
case FieldStyle.Capitalize => capitalize(string)
case FieldStyle.Uncapitalize => uncapitalize(string)
Expand Down

0 comments on commit 2164297

Please sign in to comment.